Files
BeWoPlaner/Controls/Themes/Generic.xaml
Rene Evertz 6f12c06078 Styles nur in PrototypeStyles.xaml
CustomerVermittlungArbeitView Control anpassungen
Xaml
2024-09-11 12:05:11 +02:00

415 lines
22 KiB
XML

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:local="clr-namespace:BeWo.Controls">
<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
x:Name="Bd"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
RenderFocused="{TemplateBinding IsKeyboardFocusWithin}"
RenderMouseOver="{TemplateBinding IsMouseOver}"
SnapsToDevicePixels="true">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
<Button
x:Name="PART_PopUpButton"
Grid.Column="1"
Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}"
Height="20"
Margin="1,0,1,0"
Padding="0,5,0,0"
VerticalAlignment="Stretch">
<Polyline
HorizontalAlignment="Center"
VerticalAlignment="Center"
Points="0,0 10,0"
SnapsToDevicePixels="True"
Stroke="Red"
StrokeDashArray="1 1"
StrokeThickness="2" />
</Button>
<Button
x:Name="PART_NewButton"
Grid.Column="2"
Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}"
Margin="1,0,1,0"
VerticalAlignment="Stretch"
Content="&#x9D;"
FontFamily="Webdings" />
<Button
x:Name="PART_DeleteButton"
Grid.Column="3"
Width="{Binding Path=ActualHeight, RelativeSource={RelativeSource Self}}"
Height="20"
Margin="1,0,1,0"
Padding="0"
VerticalAlignment="Stretch"
Visibility="{TemplateBinding DeleteButtonVisibility}">
<Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Path
Data="M -3,-3 L 3, 3"
Stroke="White"
StrokeEndLineCap="Round"
StrokeStartLineCap="Round"
StrokeThickness="1.5" />
<Path
Data="M 3,-3 L -3, 3"
Stroke="White"
StrokeEndLineCap="Round"
StrokeStartLineCap="Round"
StrokeThickness="1.5" />
</Canvas>
</Button>
</Grid>
</Microsoft_Windows_Themes:ListBoxChrome>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="Bd" Property="Background" 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
x:Name="Bd"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
RenderFocused="{TemplateBinding IsKeyboardFocusWithin}"
RenderMouseOver="{TemplateBinding IsMouseOver}"
SnapsToDevicePixels="true">
<ScrollViewer x:Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Microsoft_Windows_Themes:ListBoxChrome>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="Bd" Property="Background" 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" MappingMode="Absolute" StartPoint="0,0" EndPoint="0,20">
<GradientStop Offset="0.05" Color="#ABADB3" />
<GradientStop Offset="0.07" Color="#E2E3EA" />
<GradientStop Offset="1" Color="#E3E9EF" />
</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
x:Name="PART_Hours"
Grid.Column="0"
Text="{Binding Path=SelectedHour}">
<TextBox.Template>
<ControlTemplate TargetType="{x:Type TextBox}">
<ScrollViewer x:Name="PART_ContentHost" />
</ControlTemplate>
</TextBox.Template>
</TextBox>
<TextBlock Grid.Column="1" Text=":" />
<!-- minute text -->
<TextBox
x:Name="PART_Minutes"
Grid.Column="2"
Text="{Binding Path=SelectedMinute}">
<TextBox.Template>
<ControlTemplate TargetType="{x:Type TextBox}">
<ScrollViewer x:Name="PART_ContentHost" />
</ControlTemplate>
</TextBox.Template>
</TextBox>
<TextBlock
Grid.Column="3"
Text=":"
Visibility="Collapsed" />
<!-- seconds text -->
<TextBox
x:Name="PART_Seconds"
Grid.Column="4"
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" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#F3F3F3" />
<GradientStop Offset="0.5" Color="#EBEBEB" />
<GradientStop Offset="0.5" Color="#DDDDDD" />
<GradientStop Offset="1" Color="#CDCDCD" />
</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"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
RenderMouseOver="{TemplateBinding IsMouseOver}"
RenderPressed="{TemplateBinding IsPressed}"
SnapsToDevicePixels="true">
<Grid Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" HorizontalAlignment="Right">
<Path
x:Name="Arrow"
Margin="3,1,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="{StaticResource DownArrowGeometry}"
Fill="Black" />
</Grid>
</Microsoft_Windows_Themes:ButtonChrome>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="Chrome" Property="RenderPressed" Value="true" />
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="Arrow" Property="Fill" 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
x:Name="PART_ContentHost"
Background="Transparent"
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
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
FlowDirection="RightToLeft"
LastChildFill="True"
SnapsToDevicePixels="True">
<ContentControl
Content="{TemplateBinding Property=Content}"
DataContext="{TemplateBinding Property=GridControl}"
FlowDirection="LeftToRight" />
</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}" />
</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 x:Name="PART_Content" Grid.Row="1" />
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>