wabbajack/Wabbajack/Views/Common/BeginButton.xaml

88 lines
4.3 KiB
Plaintext
Raw Normal View History

2019-11-09 05:46:36 +00:00
<UserControl
x:Class="Wabbajack.BeginButton"
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:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:local="clr-namespace:Wabbajack"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Border
x:Name="BeginButtonPurpleGlow"
Width="76"
Height="76"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Background="{StaticResource PrimaryVariantBrush}"
CornerRadius="43"
Visibility="{Binding IsEnabled, ElementName=button, Converter={StaticResource bool2VisibilityHiddenConverter}}">
2019-11-09 05:46:36 +00:00
<Border.Effect>
<BlurEffect Radius="10" />
</Border.Effect>
<Border.Style>
<Style TargetType="Border">
<Setter Property="Opacity" Value="0.5" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=BeginButton}" Value="True">
<Setter Property="Opacity" Value="0.8" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
</Border>
<Button
x:Name="button"
2019-11-09 05:46:36 +00:00
Width="54"
Height="54"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding Command, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<icon:PackIconMaterial
Width="25"
Height="25"
Margin="5,0,0,0"
Kind="Play">
<icon:PackIconMaterial.Style>
<Style TargetType="icon:PackIconMaterial">
<Setter Property="Foreground" Value="#666666" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Value="True">
<Setter Property="Foreground" Value="{StaticResource SecondaryBrush}" />
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Value="True" />
<Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Value="True" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Foreground" Value="#00ffe7" />
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</icon:PackIconMaterial.Style>
</icon:PackIconMaterial>
<Button.Style>
<Style BasedOn="{StaticResource CircleButtonStyle}" TargetType="Button">
<Setter Property="Background" Value="#333333" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="BorderBrush" Value="{StaticResource SecondaryBrush}" />
<Setter Property="Background" Value="#222222" />
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect
BlurRadius="15"
ShadowDepth="0"
Color="{StaticResource Secondary}" />
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
</Button>
</Grid>
</UserControl>