306 lines
15 KiB
XML
306 lines
15 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:BeWo.Controls" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
|
|
|
|
<SolidColorBrush x:Key="TextBoxBorderBrush" Color="#FF86878F" />
|
|
|
|
<Style TargetType="{x:Type local:PopUpEdit}">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
|
|
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Padding" Value="1" />
|
|
<Setter Property="AllowDrop" Value="true" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:PopUpEdit}">
|
|
<Microsoft_Windows_Themes:ListBoxChrome SnapsToDevicePixels="true" x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" RenderMouseOver="{TemplateBinding IsMouseOver}">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ScrollViewer SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ContentHost" />
|
|
<Button Grid.Column="1" Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}" VerticalAlignment="Stretch" x:Name="PART_PopUpButton" Padding="0,5,0,0" Margin="1,0,1,0" Height="20">
|
|
<Polyline Stroke="Red" SnapsToDevicePixels="True" StrokeThickness="2" StrokeDashArray="1 1" Points="0,0 10,0" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
|
</Button>
|
|
|
|
<Button Grid.Column="2" Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}" VerticalAlignment="Stretch" x:Name="PART_NewButton" Content="" FontFamily="Webdings" Margin="1,0,1,0"></Button>
|
|
|
|
<Button Padding="0" Grid.Column="3" Visibility="{TemplateBinding DeleteButtonVisibility}" Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}" VerticalAlignment="Stretch" x:Name="PART_DeleteButton" Margin="1,0,1,0" Height="20">
|
|
<Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<Path Stroke="White" StrokeThickness="1.5" Data="M -3,-3 L 3, 3" StrokeStartLineCap="Round" StrokeEndLineCap="Round" />
|
|
<Path Stroke="White" StrokeThickness="1.5" Data="M 3,-3 L -3, 3" StrokeStartLineCap="Round" StrokeEndLineCap="Round" />
|
|
</Canvas>
|
|
</Button>
|
|
</Grid>
|
|
</Microsoft_Windows_Themes:ListBoxChrome>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type local:MaskedTextBox}">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
|
|
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
|
|
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Padding" Value="1" />
|
|
<Setter Property="AllowDrop" Value="true" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TextBox}">
|
|
<Microsoft_Windows_Themes:ListBoxChrome SnapsToDevicePixels="true" x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" RenderMouseOver="{TemplateBinding IsMouseOver}">
|
|
<ScrollViewer SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ContentHost" />
|
|
</Microsoft_Windows_Themes:ListBoxChrome>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<LinearGradientBrush x:Key="b" EndPoint="0,20" StartPoint="0,0" MappingMode="Absolute">
|
|
<GradientStop Color="#ABADB3" Offset="0.05" />
|
|
<GradientStop Color="#E2E3EA" Offset="0.07" />
|
|
<GradientStop Color="#E3E9EF" Offset="1" />
|
|
</LinearGradientBrush>
|
|
|
|
<Style TargetType="{x:Type local:TimePicker}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:TimePicker}">
|
|
<!--Border that wraps the control-->
|
|
<Border BorderBrush="{StaticResource b}" BorderThickness="1">
|
|
<Grid Background="White" DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:TimePicker}}}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid Height="Auto">
|
|
|
|
<Grid.Resources>
|
|
<!--Control template to remove the default style of the textblock-->
|
|
<Style TargetType="{x:Type TextBlock}">
|
|
<Setter Property="Foreground" Value="{Binding Path=Foreground}" />
|
|
<Setter Property="FontWeight" Value="{Binding Path=FontWeight}" />
|
|
<Setter Property="FontStyle" Value="{Binding Path=FontStyle}" />
|
|
<Setter Property="FontStretch" Value="{Binding Path=FontStretch}" />
|
|
<Setter Property="FontSize" Value="{Binding Path=FontSize}" />
|
|
<Setter Property="FontFamily" Value="{Binding Path=FontFamily}" />
|
|
<Setter Property="Margin" Value="0" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
</Style>
|
|
<!--Control template to remove the default style of the textboxes-->
|
|
<Style TargetType="{x:Type TextBox}">
|
|
<!--Bind properties to use in the textboxes-->
|
|
<Setter Property="Foreground" Value="{Binding Path=Foreground}" />
|
|
<Setter Property="FontWeight" Value="{Binding Path=FontWeight}" />
|
|
<Setter Property="FontStyle" Value="{Binding Path=FontStyle}" />
|
|
<Setter Property="FontStretch" Value="{Binding Path=FontStretch}" />
|
|
<Setter Property="FontSize" Value="{Binding Path=FontSize}" />
|
|
<Setter Property="FontFamily" Value="{Binding Path=FontFamily}" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="23" />
|
|
<ColumnDefinition Width="5" />
|
|
<ColumnDefinition Width="23" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!--Hour text-->
|
|
<TextBox Grid.Column="0" x:Name="PART_Hours" Text="{Binding Path=SelectedHour}">
|
|
<TextBox.Template>
|
|
<ControlTemplate TargetType="{x:Type TextBox}">
|
|
<ScrollViewer x:Name="PART_ContentHost" />
|
|
</ControlTemplate>
|
|
</TextBox.Template>
|
|
</TextBox>
|
|
<TextBlock Text=":" Grid.Column="1" />
|
|
<!--minute text-->
|
|
<TextBox Grid.Column="2" x:Name="PART_Minutes" Text="{Binding Path=SelectedMinute}">
|
|
<TextBox.Template>
|
|
<ControlTemplate TargetType="{x:Type TextBox}">
|
|
<ScrollViewer x:Name="PART_ContentHost" />
|
|
</ControlTemplate>
|
|
</TextBox.Template>
|
|
</TextBox>
|
|
<TextBlock Text=":" Grid.Column="3" Visibility="Collapsed" />
|
|
<!--seconds text-->
|
|
<TextBox Grid.Column="4" x:Name="PART_Seconds" Text="{Binding Path=SelectedSecond}" Visibility="Collapsed">
|
|
<TextBox.Template>
|
|
<ControlTemplate TargetType="{x:Type TextBox}">
|
|
<ScrollViewer x:Name="PART_ContentHost" />
|
|
</ControlTemplate>
|
|
</TextBox.Template>
|
|
</TextBox>
|
|
</Grid>
|
|
|
|
<Grid Grid.Column="1">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Button x:Name="PART_IncreaseTime" Padding="0">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<TextBlock FontFamily="Webdings" Text="5" />
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
<Button x:Name="PART_DecrementTime" Grid.Row="1">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<TextBlock FontFamily="Webdings" Text="6" />
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
|
|
<Style x:Key="ComboBoxFocusVisual">
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Rectangle Margin="4,4,21,4" SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
|
|
<GradientStop Color="#F3F3F3" Offset="0" />
|
|
<GradientStop Color="#EBEBEB" Offset="0.5" />
|
|
<GradientStop Color="#DDDDDD" Offset="0.5" />
|
|
<GradientStop Color="#CDCDCD" Offset="1" />
|
|
</LinearGradientBrush>
|
|
<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070" />
|
|
<Geometry x:Key="DownArrowGeometry">
|
|
M 0 0 L 3.5 4 L 7 0 Z
|
|
</Geometry>
|
|
<Style x:Key="ComboBoxReadonlyToggleButton" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true" />
|
|
<Setter Property="IsTabStop" Value="false" />
|
|
<Setter Property="Focusable" Value="false" />
|
|
<Setter Property="ClickMode" Value="Press" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Microsoft_Windows_Themes:ButtonChrome x:Name="Chrome" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}">
|
|
<Grid HorizontalAlignment="Right" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
|
|
<Path HorizontalAlignment="Center" Margin="3,1,0,0" x:Name="Arrow" VerticalAlignment="Center" Fill="Black" Data="{StaticResource DownArrowGeometry}" />
|
|
</Grid>
|
|
</Microsoft_Windows_Themes:ButtonChrome>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter Property="RenderPressed" TargetName="Chrome" Value="true" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Fill" TargetName="Arrow" Value="#AFAFAF" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
|
|
<Setter Property="OverridesDefaultStyle" Value="true" />
|
|
<Setter Property="AllowDrop" Value="true" />
|
|
<Setter Property="MinWidth" Value="0" />
|
|
<Setter Property="MinHeight" Value="0" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type TextBox}">
|
|
<ScrollViewer Background="Transparent" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
|
|
<Style TargetType="{x:Type local:BSGridControl}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:BSGridControl}">
|
|
|
|
<DockPanel FlowDirection="RightToLeft" LastChildFill="True" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SnapsToDevicePixels="True">
|
|
|
|
<ContentControl FlowDirection="LeftToRight" Content="{TemplateBinding Property=Content}" DataContext="{TemplateBinding Property=GridControl}" />
|
|
</DockPanel>
|
|
<ControlTemplate.Triggers>
|
|
<!--<Trigger Property="OptionsContent" Value="{x:Null}">
|
|
<Setter Property="Visibility" Value="Collapsed" TargetName="optionsReveal"/>
|
|
</Trigger>-->
|
|
<!--<Trigger Property="OptionsExpanded" Value="True">
|
|
<Trigger.EnterActions>
|
|
<BeginStoryboard Storyboard="{StaticResource optionsRevealStoryboard1}"/>
|
|
</Trigger.EnterActions>
|
|
<Trigger.ExitActions>
|
|
<BeginStoryboard Storyboard="{StaticResource optionsRevealStoryboard2}"/>
|
|
</Trigger.ExitActions>
|
|
</Trigger>-->
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
|
|
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type local:PopUpWindow}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:PopUpWindow}">
|
|
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"></Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
|
|
<Style TargetType="{x:Type local:ExpanderPanel}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:ExpanderPanel}">
|
|
<Border x:Name="PART_Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid x:Name="PART_Header" />
|
|
<Grid Grid.Row="1" x:Name="PART_Content" />
|
|
</Grid>
|
|
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ResourceDictionary> |