mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-10-01 01:26:17 +13:00
137 lines
6.5 KiB
XML
137 lines
6.5 KiB
XML
<Page
|
|
x:Class="ModAssistant.Pages.Mods"
|
|
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:ModAssistant"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
Title="{DynamicResource Mods:Title}"
|
|
d:DesignHeight="629"
|
|
d:DesignWidth="1182"
|
|
Loaded="Page_Loaded"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock
|
|
Name="SearchText"
|
|
Padding="5,0,0,0"
|
|
Height="0"
|
|
Grid.Row="0"
|
|
Text="{DynamicResource Mods:SearchLabel}"
|
|
Panel.ZIndex="1"
|
|
Foreground="{DynamicResource TextColor}"
|
|
Background="{DynamicResource BottomStatusBarBackground}" />
|
|
<TextBox
|
|
Name="SearchBar"
|
|
Margin="0,-1,0,0"
|
|
Padding="3,1,0,0"
|
|
Height="0"
|
|
Grid.Row="0"
|
|
Panel.ZIndex="2"
|
|
Background="#00000000"
|
|
Foreground="{DynamicResource TextColor}"
|
|
TextChanged="SearchBar_TextChanged"
|
|
BorderThickness="0" />
|
|
<ListView
|
|
Name="ModsListView"
|
|
Grid.Column="1"
|
|
Grid.Row="1"
|
|
SelectionChanged="ModsListView_SelectionChanged"
|
|
SelectionMode="Single">
|
|
<ListView.View>
|
|
<GridView>
|
|
<GridView.Columns>
|
|
<GridViewColumn Width="30">
|
|
<GridViewColumn.Header>
|
|
<Button
|
|
Name="SearchButton"
|
|
Background="#00000000"
|
|
BorderThickness="0"
|
|
Click="SearchButton_Click"
|
|
Padding="9,-1,9,0"
|
|
Margin="-5"
|
|
Content="🔍"
|
|
FontSize="11" />
|
|
</GridViewColumn.Header>
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<CheckBox
|
|
Name="ModCheckBox"
|
|
Checked="ModCheckBox_Checked"
|
|
IsChecked="{Binding Path=IsSelected, Mode=TwoWay}"
|
|
IsEnabled="{Binding IsEnabled}"
|
|
Tag="{Binding ModInfo}"
|
|
Unchecked="ModCheckBox_Unchecked" />
|
|
</DataTemplate>
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
<GridViewColumn DisplayMemberBinding="{Binding ModName}" Header="{DynamicResource Mods:Header:Name}" />
|
|
|
|
<GridViewColumn x:Name="InstalledColumn" Header="{DynamicResource Mods:Header:Installed}">
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock
|
|
Foreground="{Binding GetVersionColor}"
|
|
Text="{Binding InstalledVersion}"
|
|
TextDecorations="{Binding GetVersionDecoration}" />
|
|
</DataTemplate>
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
|
|
<GridViewColumn DisplayMemberBinding="{Binding ModVersion}" Header="{DynamicResource Mods:Header:Latest}" />
|
|
<GridViewColumn x:Name="DescriptionColumn" Header="{DynamicResource Mods:Header:Description}">
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Margin="{Binding PromotionMargin}">
|
|
<Hyperlink NavigateUri="{Binding PromotionLink, TargetNullValue=about:blank}" RequestNavigate="Hyperlink_RequestNavigate">
|
|
<Run Text="{Binding PromotionText}" />
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
<TextBlock Text="{Binding ModDescription}" MouseLeftButtonDown="CopyText" />
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
|
|
<GridViewColumn
|
|
x:Name="UninstallColumn"
|
|
Width="70"
|
|
Header="{DynamicResource Mods:Header:Uninstall}">
|
|
<GridViewColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<Button
|
|
Name="Uninstall"
|
|
Click="Uninstall_Click"
|
|
Content="{DynamicResource Mods:UninstallButton}"
|
|
Foreground="Red"
|
|
IsEnabled="{Binding CanDelete}"
|
|
Tag="{Binding ModInfo}"
|
|
Visibility="{Binding CanSeeDelete}" />
|
|
</DataTemplate>
|
|
</GridViewColumn.CellTemplate>
|
|
</GridViewColumn>
|
|
</GridView.Columns>
|
|
</GridView>
|
|
</ListView.View>
|
|
<ListView.GroupStyle>
|
|
<GroupStyle>
|
|
<GroupStyle.HeaderTemplate>
|
|
<DataTemplate>
|
|
<TextBlock
|
|
Padding="6,0,0,0"
|
|
FontSize="14"
|
|
FontWeight="Bold"
|
|
Text="{Binding Name}" />
|
|
</DataTemplate>
|
|
</GroupStyle.HeaderTemplate>
|
|
</GroupStyle>
|
|
</ListView.GroupStyle>
|
|
</ListView>
|
|
</Grid>
|
|
</Page>
|