Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Application x:Class="FrontEndTask.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
- StartupUri="MainWindow.xaml">
- <Application.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml" />
- <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <!-- Creating the default CheckBox style - Displays circle path, when state is unchecked -->
- <Style x:Key="DefaultCheckBoxStyle" TargetType="CheckBox">
- <Setter Property="Background" Value="{telerik1:Office2013Resource ResourceKey=MainBrush}" />
- <Setter Property="BorderBrush" Value="{telerik1:Office2013Resource ResourceKey=HighDarkBrush}" />
- <Setter Property="Foreground" Value="{telerik1:Office2013Resource ResourceKey=InvertedBrush}" />
- <Setter Property="FontFamily" Value="{telerik1:Office2013Resource ResourceKey=FontFamily}" />
- <Setter Property="Padding" Value="6 2" />
- <Setter Property="FontSize" Value="{telerik1:Office2013Resource ResourceKey=FontSizeL}" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Validation.ErrorTemplate">
- <Setter.Value>
- <ControlTemplate>
- <Grid Width="14" HorizontalAlignment="Left">
- <AdornedElementPlaceholder x:Name="Holder" />
- <Grid Width="13" Height="13" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="1 0 0 0">
- <Border BorderBrush="{telerik1:Office2013Resource ResourceKey=ValidationBrush}"
- BorderThickness="1" SnapsToDevicePixels="True" />
- <Path Data="M0,0 L10,0 10,10 z"
- Fill="{telerik1:Office2013Resource ResourceKey=ValidationBrush}"
- HorizontalAlignment="Right"
- VerticalAlignment="Top"
- Width="7"
- Height="7"
- Stretch="Fill"
- SnapsToDevicePixels="True" />
- </Grid>
- <ToolTipService.ToolTip>
- <ToolTip x:Name="PART_ToolTip"
- DataContext="{Binding RelativeSource={RelativeSource Mode=Self}, Path=PlacementTarget.DataContext}"
- Template="{StaticResource ErrorTooltipTemplate}"
- Placement="Right" />
- </ToolTipService.ToolTip>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="CheckBox">
- <Grid x:Name="Root" Background="Transparent">
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal" />
- <VisualState x:Name="MouseOver">
- <Storyboard>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="normal"
- Storyboard.TargetProperty="Stroke">
- <DiscreteObjectKeyFrame KeyTime="0"
- Value="{telerik1:Office2013Resource ResourceKey=AccentMainBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckVisual"
- Storyboard.TargetProperty="Stroke">
- <DiscreteObjectKeyFrame KeyTime="0"
- Value="{telerik1:Office2013Resource ResourceKey=InvertedBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateVisual"
- Storyboard.TargetProperty="Stroke">
- <DiscreteObjectKeyFrame KeyTime="0"
- Value="{telerik1:Office2013Resource ResourceKey=InvertedBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <ObjectAnimationUsingKeyFrames Duration="0:0:0"
- Storyboard.TargetName="Layer"
- Storyboard.TargetProperty="Fill">
- <DiscreteObjectKeyFrame KeyTime="0:0:0"
- Value="{telerik1:Office2013Resource ResourceKey=AccentMainBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Layer"
- Storyboard.TargetProperty="Opacity">
- <LinearDoubleKeyFrame KeyTime="00:00:00" Value="0.2"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Pressed">
- <Storyboard>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="normal"
- Storyboard.TargetProperty="Stroke">
- <DiscreteObjectKeyFrame KeyTime="0"
- Value="{telerik1:Office2013Resource ResourceKey=AccentMainBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckVisual"
- Storyboard.TargetProperty="Stroke">
- <DiscreteObjectKeyFrame KeyTime="0"
- Value="{telerik1:Office2013Resource ResourceKey=InvertedBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IndeterminateVisual"
- Storyboard.TargetProperty="Stroke">
- <DiscreteObjectKeyFrame KeyTime="0"
- Value="{telerik1:Office2013Resource ResourceKey=InvertedBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <ObjectAnimationUsingKeyFrames Duration="0:0:0"
- Storyboard.TargetName="Layer"
- Storyboard.TargetProperty="Fill">
- <DiscreteObjectKeyFrame KeyTime="0:0:0"
- Value="{telerik1:Office2013Resource ResourceKey=AccentMainBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Layer"
- Storyboard.TargetProperty="Opacity">
- <LinearDoubleKeyFrame KeyTime="00:00:00" Value="0.5" />
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Disabled">
- <Storyboard>
- <DoubleAnimation Duration="0" To="1"
- Storyboard.TargetProperty="Opacity"
- Storyboard.TargetName="DisabledVisualElement" />
- <DoubleAnimation Duration="0"
- To="0.3"
- Storyboard.TargetProperty="Opacity"
- Storyboard.TargetName="Content" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- <VisualStateGroup x:Name="CheckStates">
- <VisualState x:Name="Unchecked" />
- <VisualState x:Name="Checked">
- <Storyboard>
- <DoubleAnimation To="0"
- Duration="0"
- Storyboard.TargetName="UncheckVisual"
- Storyboard.TargetProperty="(UIElement.Opacity)" />
- <DoubleAnimation To="1"
- Duration="0"
- Storyboard.TargetName="CheckVisual"
- Storyboard.TargetProperty="(UIElement.Opacity)" />
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Indeterminate">
- <Storyboard>
- <DoubleAnimation To="0"
- Duration="0"
- Storyboard.TargetName="UncheckVisual"
- Storyboard.TargetProperty="(UIElement.Opacity)" />
- <DoubleAnimation To="1"
- Duration="0"
- Storyboard.TargetName="IndeterminateVisual"
- Storyboard.TargetProperty="(UIElement.Opacity)" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- <VisualStateGroup x:Name="FocusStates">
- <VisualState x:Name="Unfocused" />
- <VisualState x:Name="Focused">
- <Storyboard>
- <DoubleAnimation To="1"
- Duration="0"
- Storyboard.TargetName="FocusVisual"
- Storyboard.TargetProperty="(UIElement.Opacity)" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition Width="*" />
- </Grid.ColumnDefinitions>
- <Grid x:Name="grid" Margin="1" Width="13" Height="13">
- <Rectangle x:Name="normal" Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}" />
- <Path x:Name="UncheckVisual"
- Stretch="Fill"
- FlowDirection="LeftToRight"
- Stroke="{telerik1:Office2013Resource ResourceKey=StrongBrush}"
- Data="M24.5,12.5 C24.5,19.127417 19.127417,24.5 12.5,24.5 C5.872583,24.5 0.5,19.127417 0.5,12.5 C0.5,5.872583 5.872583,0.5 12.5,0.5 C19.127417,0.5 24.5,5.872583 24.5,12.5 z"
- StrokeThickness="1.5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Width="8"
- Height="8"
- Opacity="1" />
- <Border x:Name="DisabledVisualElement"
- BorderThickness="{TemplateBinding BorderThickness}"
- Background="{TemplateBinding Background}"
- BorderBrush="{telerik1:Office2013Resource ResourceKey=MediumDarkBrush}"
- IsHitTestVisible="False"
- Opacity="0" />
- <Rectangle x:Name="Layer" Fill="{TemplateBinding Background}" Opacity="0" />
- <Path x:Name="CheckVisual"
- Stretch="Fill"
- FlowDirection="LeftToRight"
- Stroke="{telerik1:Office2013Resource ResourceKey=StrongBrush}"
- Data="M31.809448,76.327779 L35.056467,80.098168 39.880954,71.832455"
- StrokeThickness="1.5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Width="9"
- Height="7"
- Opacity="0" />
- <Path x:Name="IndeterminateVisual"
- Stroke="{telerik1:Office2013Resource ResourceKey=StrongBrush}"
- FlowDirection="LeftToRight"
- Stretch="Fill"
- Data="M14.708333,144.5 L20.667,144.5"
- Width="9"
- StrokeThickness="2"
- VerticalAlignment="Center"
- Opacity="0" />
- <Rectangle x:Name="FocusVisual"
- Stroke="{telerik1:Office2013Resource ResourceKey=AccentMainBrush}" Opacity="0" />
- </Grid>
- <ContentPresenter x:Name="Content"
- Grid.Column="1"
- Margin="{TemplateBinding Padding}"
- RecognizesAccessKey="True"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- Setting the default CheckBox style to our custom style -->
- <Style BasedOn="{StaticResource DefaultCheckBoxStyle}" TargetType="CheckBox" />
- <!-- Custom RadListBoxItem style - Hover animations; Lime selection color -->
- <Style x:Key="FadingLimeRadListBoxItemStyle" BasedOn="{StaticResource RadListBoxItemStyle}" TargetType="telerik1:RadListBoxItem">
- <Setter Property="Foreground" Value="{telerik1:VisualStudio2013Resource ResourceKey=MarkerBrush}" />
- <Setter Property="MinHeight" Value="22" />
- <Setter Property="Padding" Value="4 3" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Top" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="KeyboardNavigation.TabNavigation" Value="Local" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="telerik1:RadListBoxItem">
- <Grid>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualState x:Name="Normal">
- <Storyboard>
- <DoubleAnimation Duration="0:0:0.5"
- To="0"
- Storyboard.TargetProperty="Opacity"
- Storyboard.TargetName="MouseOverBorder" />
- </Storyboard>
- </VisualState>
- <VisualState x:Name="MouseOver">
- <Storyboard>
- <DoubleAnimation Duration="0:0:0.5"
- To="1" Storyboard.TargetProperty="Opacity"
- Storyboard.TargetName="MouseOverBorder" />
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Disabled">
- <Storyboard>
- <DoubleAnimation Duration="0" To="0.2"
- Storyboard.TargetProperty="Opacity"
- Storyboard.TargetName="contentPresenter" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- <VisualStateGroup x:Name="SelectionStates">
- <VisualState x:Name="Unselected"/>
- <VisualState x:Name="Selected">
- <Storyboard>
- <ObjectAnimationUsingKeyFrames Duration="0"
- Storyboard.TargetName="contentPresenter"
- Storyboard.TargetProperty="Foreground">
- <DiscreteObjectKeyFrame KeyTime="0"
- Value="{telerik1:VisualStudio2013Resource ResourceKey=SelectedBrush}" />
- </ObjectAnimationUsingKeyFrames>
- <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>
- <VisualStateGroup x:Name="FocusStates">
- <VisualState x:Name="Focused">
- <Storyboard>
- <DoubleAnimation Duration="0"
- To="1"
- Storyboard.TargetProperty="Opacity"
- Storyboard.TargetName="FocusVisual" />
- </Storyboard>
- </VisualState>
- <VisualState x:Name="Unfocused" />
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- <Border x:Name="Border"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- SnapsToDevicePixels="True" />
- <Border x:Name="MouseOverBorder"
- Opacity="0"
- Background="{telerik1:VisualStudio2013Resource ResourceKey=MouseOverBrush}"/>
- <Border x:Name="SelectedBorder" Background="Lime" Visibility="Collapsed" SnapsToDevicePixels="True" />
- <ContentControl x:Name="contentPresenter"
- Margin="{TemplateBinding Padding}"
- Foreground="{TemplateBinding Foreground}"
- IsTabStop="False"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- Content="{TemplateBinding Content}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}" />
- <Border x:Name="FocusVisual"
- Opacity="0"
- BorderThickness="1"
- BorderBrush="{telerik1:VisualStudio2013Resource ResourceKey=AccentMainBrush}"
- SnapsToDevicePixels="True" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!-- Custom RadListBox style - Displays items as checkboxes, using the FadingLimeRadListBoxItemStyle -->
- <Style x:Key="CheckedRadListBoxStyle" BasedOn="{StaticResource RadListBoxStyle}" TargetType="telerik1:RadListBox">
- <Setter Property="ItemTemplate">
- <Setter.Value>
- <DataTemplate DataType="telerik1:RadListBoxItem">
- <CheckBox Content="{Binding}"
- IsChecked="{Binding RelativeSource={RelativeSource AncestorType=telerik1:RadListBoxItem}, Path=IsSelected}">
- <CheckBox.Style>
- <Style BasedOn="{StaticResource DefaultCheckBoxStyle}" TargetType="CheckBox">
- <Style.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=telerik1:RadListBoxItem}, Path=IsSelected}"
- Value="True">
- <Setter Property="FontWeight" Value="Bold" />
- <Setter Property="FontStyle" Value="Italic" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </CheckBox.Style>
- </CheckBox>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="ItemContainerStyle" Value="{StaticResource FadingLimeRadListBoxItemStyle}" />
- </Style>
- </ResourceDictionary>
- </Application.Resources>
- </Application>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement