<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Expressions"
        xmlns:expressions="clr-namespace:Telerik.Windows.Controls.Expressions;assembly=Telerik.Windows.Controls.Expressions"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="c">
    <ResourceDictionary.MergedDictionaries>
        <telerik:Office2016ResourceDictionary/>
    </ResourceDictionary.MergedDictionaries>
    <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
    <Color x:Key="FunctionColor_Foreground">#FF1795E5</Color>
    <Color x:Key="MemberColor_Foreground">#FF8C2CBA</Color>
    <Color x:Key="StringColor_Foreground">#FF31CA34</Color>
    <Color x:Key="DateTimeColor_Foreground">#FFE51717</Color>
    <Color x:Key="CaretBrush">#FF808080</Color>
    <Color x:Key="DefaultColor_Foreground">#FF444444</Color>
    <Geometry x:Key="LoadingVisualCircle">M1,0 A1,1,90,1,1,0,-1</Geometry>
    <Geometry x:Key="LoadingVisualArrow">M0,-1.1 L0.1,-1 L0,-0.9</Geometry>
    <Style x:Key="ExpressionPathStyle" TargetType="Path">
        <Setter Property="Fill" Value="{telerik:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Stretch" Value="Fill"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Width" Value="5"/>
        <Setter Property="Height" Value="5"/>
    </Style>
    <Style x:Key="ExpressionEqualsPathStyle" TargetType="Path">
        <Setter Property="Margin" Value="0 1 0 0"/>
        <Setter Property="Fill" Value="{telerik:Office2016Resource ResourceKey=IconBrush}"/>
        <Setter Property="Stretch" Value="Fill"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <ControlTemplate x:Key="ExpressionTextBoxTemplate" TargetType="expressions:ExpressionTextBox">
        <telerik:RadRichTextBox x:Name="RichTextBox"
                AcceptsReturn="False"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                CaretColor="{StaticResource CaretBrush}"
                IsSpellCheckingEnabled="False"
                IsSelectionMiniToolBarEnabled="False"
                IsContextMenuEnabled="False"
                DocumentInheritsDefaultStyleSettings="True"/>
    </ControlTemplate>
    <Style x:Key="ExpressionTextBoxStyle" TargetType="expressions:ExpressionTextBox">
        <Setter Property="Template" Value="{StaticResource ExpressionTextBoxTemplate}"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="SyntaxColors">
            <Setter.Value>
                <expressions:SyntaxColors
                        FunctionColor="{StaticResource FunctionColor_Foreground}"
                        MemberColor="{StaticResource MemberColor_Foreground}"
                        StringColor="{StaticResource StringColor_Foreground}"
                        DateTimeColor="{StaticResource DateTimeColor_Foreground}"
                        DefaultColor="{StaticResource DefaultColor_Foreground}"/>
            </Setter.Value>
        </Setter>
    </Style>
    <HierarchicalDataTemplate x:Key="CategoryItemTemplate" ItemsSource="{Binding ChildCategories}">
        <TextBlock Text="{Binding Name}"/>
    </HierarchicalDataTemplate>
    <Style TargetType="telerik:RadTreeViewItem" x:Key="ItemStyle">
        <Setter Property="Padding" Value="5 0 5 1"/>
        <Setter Property="MinHeight" Value="27"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="IsDropAllowed" Value="True"/>
        <Setter Property="IsEnabled" Value="True"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="KeyboardNavigation.TabNavigation" Value="Local"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="telerik:RadTreeViewItem">
                    <Grid x:Name="RootElement" UseLayoutRounding="True">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <Grid x:Name="HeaderRow" Background="Transparent" MinHeight="{TemplateBinding MinHeight}" SnapsToDevicePixels="True">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Border x:Name="BorderVisual"
                                    Grid.Column="2"
                                    Grid.ColumnSpan="6"
                                    Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="{telerik:Office2016Resource ResourceKey=CornerRadius}"
                                    Margin="0 0 0 1"/>
                            <StackPanel x:Name="IndentContainer" Orientation="Horizontal">
                                <Rectangle x:Name="IndentFirstVerticalLine" Width="1" Visibility="Collapsed" Stroke="{telerik:Office2016Resource ResourceKey=BasicBrush}" VerticalAlignment="Top"/>
                            </StackPanel>
                            <Grid Grid.Column="1" x:Name="ListRootContainer" HorizontalAlignment="Center" MinWidth="21" Visibility="Collapsed">
                                <Rectangle x:Name="HorizontalLine" Height="1" Stroke="{telerik:Office2016Resource ResourceKey=BasicBrush}" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                                <Rectangle x:Name="VerticalLine" Width="1" Stroke="{telerik:Office2016Resource ResourceKey=BasicBrush}" VerticalAlignment="Top" HorizontalAlignment="Center"/>
                                <ToggleButton x:Name="Expander" IsTabStop="False" Background="{TemplateBinding Background}"/>
                                <Grid x:Name="LoadingVisual" RenderTransformOrigin="0.5 0.5" Visibility="Collapsed" VerticalAlignment="Center" HorizontalAlignment="Center">
                                    <Grid.RenderTransform>
                                        <TransformGroup>
                                            <RotateTransform x:Name="LoadingVisualAngleTransform" Angle="0" CenterX="0.5" CenterY="0.5"/>
                                        </TransformGroup>
                                    </Grid.RenderTransform>
                                    <Path Width="10" Height="10" Stretch="Fill" Stroke="{TemplateBinding Foreground}" StrokeThickness="1" StrokeStartLineCap="Round" Data="{StaticResource LoadingVisualCircle}"/>
                                    <Path
                                            Margin="5 -1.5 0 0"
                                            HorizontalAlignment="Left"
                                            VerticalAlignment="Top"
                                            Width="4"
                                            Height="4"
                                            Stretch="Fill"
                                            Fill="{TemplateBinding Foreground}"
                                            Data="{StaticResource LoadingVisualArrow}"
                                            StrokeThickness="1"/>
                                </Grid>
                            </Grid>
                            <Image Grid.Column="3" x:Name="Image" MaxWidth="16" MaxHeight="16" Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                            <Grid x:Name="HeaderContentPanel" Grid.Column="4" Grid.ColumnSpan="2" Background="Transparent">
                                <ContentControl x:Name="Header"
                                        Content="{TemplateBinding Header}"
                                        ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        Margin="{TemplateBinding Padding}"
                                        IsTabStop="False"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
                                        Foreground="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground, Mode=OneWay}"/>
                                <ContentPresenter x:Name="EditHeaderElement"
                                        Visibility="Collapsed"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        Margin="{TemplateBinding Padding}"
                                        ContentTemplateSelector="{TemplateBinding HeaderEditTemplateSelector}"
                                        ContentTemplate="{TemplateBinding HeaderEditTemplate}"/>
                            </Grid>
                            <CheckBox IsTabStop="False" Grid.Column="2" VerticalAlignment="Center" Margin="5 0 0 0" x:Name="CheckBoxElement" Visibility="Collapsed"/>
                            <RadioButton IsTabStop="False" Grid.Column="2" Margin="5 0 0 0" VerticalAlignment="Center" x:Name="RadioButtonElement" Visibility="Collapsed"/>
                        </Grid>
                        <ItemsPresenter Grid.Row="1" x:Name="ItemsHost" Visibility="Collapsed"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True">
                            <Setter TargetName="BorderVisual" Property="BorderThickness" Value="1"/>
                            <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik:Office2016Resource ResourceKey=AccentFocusedBrush}"/>
                            <Setter TargetName="Header" Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=MarkerBrush}"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Office2016Resource ResourceKey=AccentBrush}"/>
                            <Setter TargetName="Header" Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderThickness" Value="0"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True"/>
                                <Condition Property="IsFocused" Value="False"/>
                            </MultiTrigger.Conditions>
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Office2016Resource ResourceKey=ComplementaryBrush}"/>
                            <Setter TargetName="Header" Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=MarkerBrush}"/>
                        </MultiTrigger>
                        <Trigger Property="IsExpanded" Value="True">
                            <Setter TargetName="ItemsHost" Property="Visibility" Value="Visible"/>
                        </Trigger>
                        <Trigger Property="IsLoadingOnDemand" Value="True">
                            <Setter TargetName="LoadingVisual" Property="Visibility" Value="Visible"/>
                            <Setter TargetName="Expander" Property="Visibility" Value="Collapsed"/>
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="LoadingVisualTransform">
                                    <Storyboard>
                                        <DoubleAnimation From="0" To="359" Duration="0:0:1" RepeatBehavior="Forever" Storyboard.TargetName="LoadingVisualAngleTransform" Storyboard.TargetProperty="Angle"/>
                                    </Storyboard>
                                </BeginStoryboard>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <StopStoryboard BeginStoryboardName="LoadingVisualTransform"/>
                            </Trigger.ExitActions>
                        </Trigger>
                        <Trigger Property="IsMouseOver" SourceName="HeaderRow" Value="True">
                            <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                            <Setter TargetName="BorderVisual" Property="BorderThickness" Value="0"/>
                            <Setter TargetName="Header" Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True"/>
                                <Condition Property="IsSelected" Value="True"/>
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="BorderVisual" Property="Background" Value="{telerik:Office2016Resource ResourceKey=AccentMouseOverBrush}"/>
                                <Setter TargetName="Header" Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=MarkerInvertedBrush}"/>
                                <Setter TargetName="BorderVisual" Property="BorderThickness" Value="2"/>
                                <Setter TargetName="BorderVisual" Property="BorderBrush" Value="{telerik:Office2016Resource ResourceKey=BasicBrush}"/>
                            </MultiTrigger.Setters>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter TargetName="Header" Property="Opacity" Value="{telerik:Office2016Resource ResourceKey=DisabledOpacity}"/>
                            <Setter TargetName="Image" Property="Opacity" Value="{telerik:Office2016Resource ResourceKey=DisabledOpacity}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <ControlTemplate x:Key="RadExpressionEditorTemplate" TargetType="controls:RadExpressionEditor">
        <Border x:Name="PART_RootElement"
                Background="{TemplateBinding Background}"
                BorderBrush="{TemplateBinding BorderBrush}"
                BorderThickness="{TemplateBinding BorderThickness}"
                SnapsToDevicePixels="True">
            <Grid x:Name="PART_ExpressionEditorGrid">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <expressions:ExpressionTextBox x:Name="PART_ExpressionNodeEditor"/>
                <Border
                        Grid.Row="1"
                        MinHeight="26"
                        Background="{telerik:Office2016Resource ResourceKey=AlternativeBrush}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="0 1"
                        SnapsToDevicePixels="True">
                    <StackPanel x:Name="CalculationPanel" Margin="0 0 13 0" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
                        <telerik:RadPathButton x:Name="Plus"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="+"
                                PathGeometry="M3,0 L5,0 L5,3 L8,3 L8,5 L5,5 L5,8 L3,8 L3,5L 0,5 L0,3 L3,3z"/>
                        <telerik:RadPathButton x:Name="Minus"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="-"
                                PathGeometry="M0,0 L8,0 L8,2 L0,2z"/>
                        <telerik:RadPathButton x:Name="Multiply"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="*"
                                PathGeometry="M1,0 L4,3 L7,0 L8,1 L5,4 L8,7 L7,8 L4,5 L1,8 L0,7 L3,4 L0,1z"/>
                        <telerik:RadPathButton x:Name="Divide"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="/"
                                PathGeometry="M6,0 L8,0 L2,8 L0,8z"/>
                        <telerik:RadPathButton x:Name="Percent"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="%"
                                PathGeometry="M6.5,5 C7.3,5 8,5.6 8,6.5 C8,7.3 7.3,8 6.5,8 C5.6,8 5,7.3 5,6.5 C5,5.6 5.6,5 6.5,5z M6,0 L8,0 L2,8 L0,8z M1.5,0 C2.3,0 3,0.6 3,1.5 C3,2.3 2.3,3 1.5,3 C0.6,3 0,2.3 0,1.5 C0,0.6 0.6,0 1.5,0z"/>
                        <telerik:RadPathButton x:Name="Equals"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                PathStyle="{StaticResource ExpressionEqualsPathStyle}"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="="
                                PathGeometry="M0,2 L5,2 L5,3 L0,3 z M0,0 L5,0 L5,1 L0,1 z"/>
                        <telerik:RadPathButton x:Name="NotEquals"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="&lt;&gt;"
                                PathGeometry="M3.75,0 L5,0 L4.25,1 L5,1 L5,2 L3.5,2 L2.75,3 L5,3 L5,4 L2,4 L1.25,5 L0,5 L0.75,4 L0,4 L0,3 L1.5,3 L2.25,2 L0,2 L0,1 L3,1z"/>
                        <telerik:RadPathButton x:Name="LessThan"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                PathStyle="{StaticResource ExpressionPathStyle}"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="&lt;"
                                PathGeometry="M0,4 L4,0 L5,0 L5,1 L2,4 L5,7 L5,8 L4,8z"/>
                        <telerik:RadPathButton x:Name="LessThanOrEquals"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="&lt;="
                                PathGeometry="M7,3 L12,3 L12,4 L7,4 z M7,1 L12,1 L12,2 L7,2 z M4,0 L5,0 L5,0.625 L2,2.5 L5,4.375 L5,5 L4,5 L0,2.5 z"/>
                        <telerik:RadPathButton x:Name="GreaterThanOrEquals"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="&gt;="
                                PathGeometry="M7,3 L12,3 L12,4 L7,4 z M7,1 L12,1 L12,2 L7,2 z M0,0 L1,0 L5,2.5 L1,5 L0,5 L0,4.375 L3,2.5 L0,0.625 z"/>
                        <telerik:RadPathButton x:Name="GreaterThan"
                                Margin="2 0"
                                Padding="2"
                                MinWidth="20"
                                MinHeight="20"
                                PathStyle="{StaticResource ExpressionPathStyle}"
                                Command="controls:RadExpressionEditorCommands.InsertText"
                                CommandParameter="&gt;"
                                PathGeometry="M0,0 L1,0 L5,4 L1,8 L0,8 L0,7 L3,4 L0,1z"/>
                        <telerik:RadButton x:Name="And" Content="And" Margin="8 0 2 0" Padding="0" MinWidth="30" MinHeight="20" Command="controls:RadExpressionEditorCommands.InsertText" CommandParameter="And"/>
                        <telerik:RadButton x:Name="Or" Content="Or" Margin="2 0" Padding="0" MinWidth="24" MinHeight="20" Command="controls:RadExpressionEditorCommands.InsertText" CommandParameter="Or"/>
                        <telerik:RadButton x:Name="Not" Content="Not" Margin="2 0" Padding="0" MinWidth="30" MinHeight="20" Command="controls:RadExpressionEditorCommands.InsertText" CommandParameter="Not"/>
                    </StackPanel>
                </Border>
                <Grid Grid.Row="2" Background="{telerik:Office2016Resource ResourceKey=MainBrush}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <telerik:RadTreeView x:Name="PART_EditorCategoriesTree"
                            BorderThickness="0 0 1 0"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            ItemsSource="{Binding Categories}"
                            SelectedItem="{Binding SelectedCategory, Mode=TwoWay}"
                            MinHeight="146"
                            ItemTemplate="{StaticResource CategoryItemTemplate}"
                            IsLineEnabled="True"/>
                    <telerik:RadTreeView x:Name="PART_EditorItemsTree"
                            FontWeight="Normal"
                            MinHeight="146"
                            BorderThickness="0"
                            Grid.Column="1"
                            ItemsSource="{Binding CategoryItems}"
                            SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                            DisplayMemberPath="Name">
                        <telerik:RadTreeView.Resources>
                            <Style TargetType="{x:Type telerik:RadTreeViewItem}" BasedOn="{StaticResource ItemStyle}"/>
                        </telerik:RadTreeView.Resources>
                    </telerik:RadTreeView>
                </Grid>
                <Border x:Name="EditorInfoPanel" Grid.Row="3" BorderThickness="0 1" BorderBrush="{TemplateBinding BorderBrush}" MinHeight="84">
                    <Grid Margin="6">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <TextBlock
                                Grid.Row="0"
                                Text="{Binding SelectedItem.QuickInfo}"
                                Foreground="{TemplateBinding Foreground}"
                                FontSize="{TemplateBinding FontSize}"
                                FontFamily="{TemplateBinding FontFamily}"
                                FontWeight="Bold"/>
                        <TextBlock
                                Grid.Row="1"
                                Text="{Binding SelectedItem.Description}"
                                Foreground="{TemplateBinding Foreground}"
                                FontSize="{TemplateBinding FontSize}"
                                FontFamily="{TemplateBinding FontFamily}"
                                TextWrapping="Wrap"/>
                    </Grid>
                </Border>
                <Border x:Name="EditorResultsPanel" Grid.Row="4" Background="{telerik:Office2016Resource ResourceKey=AlternativeBrush}">
                    <StackPanel Orientation="Horizontal" Margin="4 8">
                        <TextBlock Text="Result preview:" HorizontalAlignment="Right"/>
                        <TextBlock Text="{Binding PreviewResult}" TextAlignment="Right"/>
                    </StackPanel>
                </Border>
            </Grid>
        </Border>
    </ControlTemplate>
    <Style x:Key="RadExpressionEditorStyle" TargetType="controls:RadExpressionEditor">
        <Setter Property="Template" Value="{StaticResource RadExpressionEditorTemplate}"/>
        <Setter Property="FontFamily" Value="{telerik:Office2016Resource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik:Office2016Resource ResourceKey=FontSize}"/>
        <Setter Property="Foreground" Value="{telerik:Office2016Resource ResourceKey=MarkerBrush}"/>
        <Setter Property="Background" Value="{telerik:Office2016Resource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik:Office2016Resource ResourceKey=BasicBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
    </Style>
    <Style TargetType="controls:RadExpressionEditor" BasedOn="{StaticResource RadExpressionEditorStyle}"/>
    <Style TargetType="expressions:ExpressionTextBox" BasedOn="{StaticResource ExpressionTextBoxStyle}"/>
</ResourceDictionary>
