95 lines
7.2 KiB
XML
95 lines
7.2 KiB
XML
<Application x:Class="dtlauncher_server_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_server_win"
|
|
StartupUri="ServerWindow.xaml">
|
|
<Application.Resources>
|
|
<ControlTemplate x:Key="myScrollBar" TargetType="{x:Type ScrollBar}">
|
|
<Grid x:Name="Bg" SnapsToDevicePixels="True">
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Row="1"/>
|
|
<Track x:Name="PART_Track" IsDirectionReversed="True" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
|
|
<Track.DecreaseRepeatButton>
|
|
<RepeatButton Command="ScrollBar.PageUpCommand">
|
|
<RepeatButton.Style>
|
|
<Style TargetType="{x:Type RepeatButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Focusable" Value="False"/>
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</RepeatButton.Style>
|
|
</RepeatButton>
|
|
</Track.DecreaseRepeatButton>
|
|
<Track.IncreaseRepeatButton>
|
|
<RepeatButton Command="ScrollBar.PageDownCommand">
|
|
<RepeatButton.Style>
|
|
<Style TargetType="{x:Type RepeatButton}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Focusable" Value="False"/>
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
|
<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</RepeatButton.Style>
|
|
</RepeatButton>
|
|
</Track.IncreaseRepeatButton>
|
|
<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}">
|
|
<Rectangle x:Name="rectangle" Fill="#FFCDCDCD" Height="{TemplateBinding Height}" SnapsToDevicePixels="True" Width="{TemplateBinding Width}"/>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Fill" TargetName="rectangle" Value="#FFA6A6A6"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDragging" Value="True">
|
|
<Setter Property="Fill" TargetName="rectangle" Value="#FF606060"/>
|
|
</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" Background="{TemplateBinding Background}">
|
|
<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="#FF6D8B8B" 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="#FF6D8B8B" 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>
|
|
</Application.Resources>
|
|
</Application>
|