mirror of
https://github.com/ZuneDev/ZuneModdingHelper.git
synced 2026-07-27 13:12:21 -07:00
79 lines
4.3 KiB
XML
79 lines
4.3 KiB
XML
<UserControl x:Class="ZuneModdingHelper.Pages.ModsPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
xmlns:core="clr-namespace:ZuneModCore;assembly=ZuneModCore"
|
|
xmlns:b="clr-namespace:ZuneModdingHelper.Behaviors"
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:local="clr-namespace:ZuneModdingHelper.Pages"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
<ListView x:Name="ModList" HorizontalContentAlignment="Stretch" BorderThickness="0"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
|
<ListView.Resources>
|
|
<Style x:Key="MetroButton" TargetType="Button" BasedOn="{StaticResource Ü}">
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="8,0,0,0"/>
|
|
<Setter Property="Grid.RowSpan" Value="3"/>
|
|
</Style>
|
|
<Style x:Key="MetroAccentButton" TargetType="Button" BasedOn="{StaticResource Ü}">
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="Margin" Value="8,0,0,0"/>
|
|
<Setter Property="Grid.RowSpan" Value="3"/>
|
|
</Style>
|
|
</ListView.Resources>
|
|
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type core:Mod}">
|
|
<Border BorderThickness="0" Padding="8">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock TextTrimming="CharacterEllipsis">
|
|
<Run Text="{Binding Title, Mode=OneWay}" FontWeight="SemiBold" FontSize="16"/>
|
|
<Run Text=" By "/><Run Text="{Binding Author, Mode=OneWay}"/>
|
|
</TextBlock>
|
|
<TextBlock Text="{Binding Description}" Grid.Row="1"
|
|
FontSize="14" TextWrapping="Wrap"/>
|
|
|
|
<Button x:Name="ModResetButton" Grid.Column="1" Click="ModResetButton_Click" ToolTip="Reset"
|
|
Style="{StaticResource OverlayButtonStyle}">
|
|
<Viewbox Width="12" Height="12">
|
|
<Path Fill="White" Data="F1 M 18.085938 3.085938 L 11.181641 10 L 18.085938 16.914062 L 16.914062 18.085938 L 10 11.181641 L 3.085938 18.085938 L 1.914062 16.914062 L 8.818359 10 L 1.914062 3.085938 L 3.085938 1.914062 L 10 8.818359 L 16.914062 1.914062 Z"/>
|
|
</Viewbox>
|
|
</Button>
|
|
|
|
<Button x:Name="ModInstallButton" Grid.Column="2" Click="ModInstallButton_Click" ToolTip="Install"
|
|
Style="{StaticResource OverlayButtonStyle}">
|
|
<Viewbox Width="12" Height="12">
|
|
<Path Fill="White" Data="F1 M 18.574219 1.914062 L 19.755859 3.085938 L 6.669922 16.181641 L 0.244141 9.755859 L 1.425781 8.574219 L 6.669922 13.818359 Z"/>
|
|
</Viewbox>
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
|
|
<i:Interaction.Behaviors>
|
|
<b:FadeAnimateItemsBehavior Tick="0:0:0.05">
|
|
<b:FadeAnimateItemsBehavior.Animation>
|
|
<DoubleAnimation From="0" To="1" Duration="0:0:0.3"/>
|
|
</b:FadeAnimateItemsBehavior.Animation>
|
|
</b:FadeAnimateItemsBehavior>
|
|
</i:Interaction.Behaviors>
|
|
</ListView>
|
|
|
|
</UserControl>
|