Files
mpv.net/src/WPF/SetupWindow.xaml
2021-08-22 18:50:11 +02:00

134 lines
5.7 KiB
XML

<Window
x:Class="mpvnet.SetupWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mpvnet="clr-namespace:mpvnet"
mc:Ignorable="d"
Title="mpv.net Setup"
FontSize="13"
Foreground="{Binding Theme.Foreground}"
Background="{Binding Theme.Background}"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner"
ResizeMode="NoResize"
>
<Window.Resources>
<ControlTemplate x:Key="ShieldButtonTemplate" TargetType="Button">
<Border x:Name="border"
CornerRadius="3"
BorderBrush="{DynamicResource PrimaryTextBrush}"
BorderThickness="1"
Background="{DynamicResource BorderBrush}">
<Grid>
<Image Source="{x:Static mpvnet:SetupWindow.ShieldIcon}"
HorizontalAlignment="Left"
Margin="9,0,0,0"
Width="20"
Height="20" />
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="border" Value="{DynamicResource RegionBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="BorderBrush" TargetName="border" Value="#2C628B"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" TargetName="border" Value="0.25"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Window.Resources>
<Grid>
<StackPanel Orientation="Horizontal">
<StackPanel Width="140" Margin="25,5,5,5">
<Border Height="50">
<TextBlock TextWrapping="Wrap"
TextAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
>Start Menu Shortcut</TextBlock>
</Border>
<Button Name="AddStartMenuShortcut"
Height="30"
Margin="3"
Click="AddStartMenuShortcut_Click"
>Add</Button>
<Button Name="RemoveStartMenuShortcut"
Height="30"
Margin="3"
Click="RemoveStartMenuShortcut_Click"
>Remove</Button>
</StackPanel>
<StackPanel Width="140" Margin="20,5,5,25">
<Border Height="50">
<TextBlock TextWrapping="Wrap"
TextAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
>File Extensions</TextBlock>
</Border>
<Button Name="AddVideo"
Height="30"
Margin="3"
Click="AddVideo_Click"
Template="{StaticResource ShieldButtonTemplate}"
>Add Video</Button>
<Button Name="AddAudio"
Height="30"
Margin="3"
Click="AddAudio_Click"
Template="{StaticResource ShieldButtonTemplate}"
>Add Audio</Button>
<Button Name="AddImage"
Height="30"
Margin="3"
Click="AddImage_Click"
Template="{StaticResource ShieldButtonTemplate}"
>Add Image</Button>
<Button Name="RemoveFileAssociations"
Margin="3,15,3,3"
Height="30"
Click="RemoveFileAssociations_Click"
Template="{StaticResource ShieldButtonTemplate}"
>Remove All</Button>
<Button Name="EditDefaultApp"
Height="30"
Margin="3"
Click="EditDefaultApp_Click"
>Edit Default App</Button>
</StackPanel>
<StackPanel Width="140" Margin="20,5,25,5">
<Border Height="50">
<TextBlock TextWrapping="Wrap"
TextAlignment="Center"
VerticalAlignment="Center"
FontSize="14"
>Path Environment Variable</TextBlock>
</Border>
<Button Name="AddToPathEnvVar"
Height="30"
Margin="3"
Click="AddToPathEnvVar_Click"
>Add</Button>
<Button Name="RemoveFromPathEnvVar"
Height="30"
Margin="3"
Click="RemoveFromPathEnvVar_Click"
>Remove</Button>
<Button Name="ShowEnvVarEditor"
Height="30"
Margin="3"
Click="ShowEnvVarEditor_Click"
>Show Editor</Button>
</StackPanel>
</StackPanel>
</Grid>
</Window>