|
@@ -3,40 +3,36 @@
|
|
|
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:converters="clr-namespace:PixiEditor.AvaloniaUI.Helpers.Converters"
|
|
|
mc:Ignorable="d"
|
|
|
d:DesignWidth="800"
|
|
|
- d:DesignHeight="450"
|
|
|
+ d:DesignHeight="450" Name="card"
|
|
|
x:Class="PixiEditor.AvaloniaUI.Views.Shortcuts.ShortcutsTemplateCard">
|
|
|
- <Border BorderThickness="1" Height="150" Width="150" Background="{DynamicResource ThemeBackgroundBrush}"
|
|
|
+ <UserControl.Styles>
|
|
|
+ <Style Selector="Border Image">
|
|
|
+ <Setter Property="Width" Value="72"/>
|
|
|
+ <Setter Property="Height" Value="72"/>
|
|
|
+ <Setter Property="Transitions">
|
|
|
+ <Transitions>
|
|
|
+ <DoubleTransition Duration="0:0:0.15" Property="Width"/>
|
|
|
+ <DoubleTransition Duration="0:0:0.15" Property="Height"/>
|
|
|
+ </Transitions>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ <Style Selector="Border:pointerover Image">
|
|
|
+ <Setter Property="Width" Value="100"/>
|
|
|
+ <Setter Property="Height" Value="100"/>
|
|
|
+ </Style>
|
|
|
+ </UserControl.Styles>
|
|
|
+ <Border BorderThickness="1" Height="150" Width="150" Background="{DynamicResource ThemeBackgroundBrush1}"
|
|
|
CornerRadius="15" PointerEntered="OnBorderPointerEntered" PointerExited="OnBorderPointerExited">
|
|
|
- <!-- TODO <Border.Triggers>
|
|
|
- <EventTrigger RoutedEvent="Border.MouseEnter">
|
|
|
- <BeginStoryboard>
|
|
|
- <Storyboard>
|
|
|
- <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Width"
|
|
|
- From="72" To="100" Duration="0:0:0.15"/>
|
|
|
- <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Height"
|
|
|
- From="72" To="100" Duration="0:0:0.15" />
|
|
|
- </Storyboard>
|
|
|
- </BeginStoryboard>
|
|
|
- </EventTrigger>
|
|
|
- <EventTrigger RoutedEvent="Border.MouseLeave">
|
|
|
- <BeginStoryboard>
|
|
|
- <Storyboard>
|
|
|
- <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Width"
|
|
|
- From="100" To="72" Duration="0:0:0.15"/>
|
|
|
- <DoubleAnimation Storyboard.TargetName="img" Storyboard.TargetProperty="Height"
|
|
|
- From="100" To="72" Duration="0:0:0.15" />
|
|
|
- </Storyboard>
|
|
|
- </BeginStoryboard>
|
|
|
- </EventTrigger>
|
|
|
- </Border.Triggers>-->
|
|
|
<Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="*"/>
|
|
|
<RowDefinition Height="30"/>
|
|
|
</Grid.RowDefinitions>
|
|
|
- <Image Grid.Row="0" Grid.RowSpan="2" Name="img" HorizontalAlignment="Center" VerticalAlignment="Center" Height="72" Width="72" Source="{Binding ElementName=card, Path=Logo}"/>
|
|
|
+ <Image Grid.Row="0" Grid.RowSpan="2" Name="img" HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
+ Source="{Binding ElementName=card, Path=Logo, Converter={converters:ImagePathToBitmapConverter}}"/>
|
|
|
<Label
|
|
|
Grid.Row="1" HorizontalAlignment="Center" FontWeight="Bold" Margin="0" Padding="0"
|
|
|
Content="{Binding ElementName=card, Path=TemplateName}"/>
|