wabbajack/Wabbajack/Views/Common/RadioButtonView.xaml

68 lines
3.2 KiB
Plaintext
Raw Normal View History

2019-11-10 06:39:40 +00:00
<UserControl
x:Class="Wabbajack.ImageRadioButtonView"
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:local="clr-namespace:Wabbajack"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="35"
ClipToBounds="False"
mc:Ignorable="d">
<Grid>
<Border
x:Name="HoverOverPrimaryGlow"
Margin="-10"
Background="{StaticResource PrimaryVariantBrush}"
CornerRadius="15"
Opacity="0.3"
Visibility="{Binding IsChecked, Converter={StaticResource bool2VisibilityHiddenConverter}, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<Border.Effect>
<BlurEffect Radius="15" />
</Border.Effect>
</Border>
<Border
x:Name="SelectedSecondaryGlow"
Margin="-2"
Background="{StaticResource SecondaryBrush}"
CornerRadius="12"
Opacity="0.3"
Visibility="{Binding IsMouseOver, Converter={StaticResource bool2VisibilityHiddenConverter}, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<Border.Effect>
<BlurEffect Radius="10" />
</Border.Effect>
</Border>
<Button
Background="Transparent"
BorderThickness="0"
Click="Button_Click">
<Image Source="{Binding Image, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}">
<Image.Style>
<Style TargetType="Image">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" Value="False" />
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" Value="False" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Effect">
<Setter.Value>
<BlurEffect Radius="2" />
</Setter.Value>
</Setter>
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</Button>
<Border
BorderBrush="{StaticResource SecondaryBrush}"
BorderThickness="1"
CornerRadius="9"
Opacity="0.8"
Visibility="{Binding IsChecked, Converter={StaticResource bool2VisibilityHiddenConverter}, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
</Grid>
</UserControl>