167 lines
9.7 KiB
XML
167 lines
9.7 KiB
XML
<Application x:Class="dtlauncher_client_win.App"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:dtlauncher_client_win"
|
|
StartupUri="LoginWindow.xaml">
|
|
<Application.Resources>
|
|
<ControlTemplate x:Key="myScrollBar" TargetType="{x:Type ScrollBar}">
|
|
<Grid x:Name="Bg" SnapsToDevicePixels="True">
|
|
<Border BorderBrush="Transparent" BorderThickness="0"
|
|
Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" Grid.Row="1"/>
|
|
<Track x:Name="PART_Track" IsDirectionReversed="True" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
|
|
<Track.Thumb>
|
|
<Thumb>
|
|
<Thumb.Style>
|
|
<Style TargetType="{x:Type Thumb}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Thumb}">
|
|
<Border x:Name="rectangle" CornerRadius="2" Background="#FF9A9FC5" Height="{TemplateBinding Height}" SnapsToDevicePixels="True" Width="{TemplateBinding Width}"/>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" TargetName="rectangle" Value="#FF9A9FC5"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDragging" Value="True">
|
|
<Setter Property="Background" TargetName="rectangle" Value="#FF515ED1"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Thumb.Style>
|
|
</Thumb>
|
|
</Track.Thumb>
|
|
</Track>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="myScrollViewer" TargetType="{x:Type ScrollViewer}">
|
|
<Grid x:Name="Grid">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<Rectangle x:Name="Corner" Grid.Column="1" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Grid.Row="1"/>
|
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
|
|
<ScrollBar Template="{DynamicResource myScrollBar}" Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"/>
|
|
<ScrollBar Template="{DynamicResource myScrollBar}" Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}" x:Name="PART_HorizontalScrollBar" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="1" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="myTabControl" TargetType="{x:Type TabControl}">
|
|
<Grid KeyboardNavigation.TabNavigation="Local">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<TabPanel
|
|
Name="HeaderPanel"
|
|
Grid.Row="0"
|
|
Panel.ZIndex="1"
|
|
Margin="0,0,4,0"
|
|
IsItemsHost="True"
|
|
KeyboardNavigation.TabIndex="1"
|
|
Background="Transparent" />
|
|
<Border
|
|
Name="Border"
|
|
Grid.Row="1"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
BorderThickness="0"
|
|
CornerRadius="2"
|
|
KeyboardNavigation.TabNavigation="Local"
|
|
KeyboardNavigation.DirectionalNavigation="Contained"
|
|
KeyboardNavigation.TabIndex="2" >
|
|
<ContentPresenter
|
|
Name="PART_SelectedContentHost"
|
|
Margin="4"
|
|
ContentSource="SelectedContent"/>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Foreground" Value="#FFF0F0F0" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="myTabItem" TargetType="{x:Type TabItem}">
|
|
<Grid>
|
|
<Border
|
|
x:Name="Border"
|
|
Margin="0,0,-4,0"
|
|
Background="#FF4D4D4D"
|
|
BorderBrush="#FF73C300"
|
|
BorderThickness="2,2,2,2"
|
|
CornerRadius="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}" >
|
|
<ContentPresenter x:Name="ContentSite"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
ContentSource="Header"
|
|
Margin="12,2,12,2"
|
|
RecognizesAccessKey="True"/>
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Panel.ZIndex" Value="100" />
|
|
<Setter TargetName="Border" Property="Background" Value="#FF0A11A2" />
|
|
<Setter TargetName="Border" Property="BorderThickness" Value="3,3,3,3" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Border" Property="Background" Value="Transparent" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="Foreground" Value="white" />
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="myTextBox" TargetType="{x:Type TextBoxBase}">
|
|
<Border
|
|
Name="Border"
|
|
Padding="2"
|
|
Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
|
|
BorderBrush="Transparent"
|
|
BorderThickness="1" >
|
|
<ScrollViewer Margin="0" x:Name="PART_ContentHost" Template="{DynamicResource myScrollViewer}"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Border" Property="Background" Value="Black"/>
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="White"/>
|
|
<Setter Property="Foreground" Value="White"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="roundedButton" TargetType="Button">
|
|
<Border x:Name="Border"
|
|
Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
|
|
BorderBrush="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"
|
|
BorderThickness="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}"
|
|
CornerRadius="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}}">
|
|
<ContentPresenter Margin="2" HorizontalAlignment="Center"
|
|
VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="#FF4E4E59"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="#FF38384F"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
</Application.Resources>
|
|
</Application>
|