mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-21 21:03:44 +12:00
Make mods list a bit faster
This commit is contained in:
parent
ea59c178e6
commit
75a3cc8392
|
@ -48,7 +48,7 @@
|
|||
<ListView
|
||||
Name="ModsListView"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Grid.Column="0"
|
||||
SelectionChanged="ModsListView_SelectionChanged"
|
||||
SelectionMode="Single"
|
||||
MouseDoubleClick="ModsListView_OnMouseDoubleClick">
|
||||
|
@ -97,7 +97,7 @@
|
|||
<GridViewColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Margin="{Binding PromotionMargin}">
|
||||
<TextBlock Margin="{Binding PromotionMargin}" Visibility="{Binding PromotionVisibility}">
|
||||
<Hyperlink NavigateUri="{Binding PromotionLink, TargetNullValue=about:blank}" RequestNavigate="Hyperlink_RequestNavigate">
|
||||
<Run Text="{Binding PromotionText}" />
|
||||
</Hyperlink>
|
||||
|
@ -143,6 +143,11 @@
|
|||
</GroupStyle.HeaderTemplate>
|
||||
</GroupStyle>
|
||||
</ListView.GroupStyle>
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
</ListView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
|
|
@ -338,14 +338,12 @@ namespace VRCMelonAssistant.Pages
|
|||
{
|
||||
Mod mod = ((sender as System.Windows.Controls.CheckBox).Tag as Mod);
|
||||
mod.ListItem.IsSelected = true;
|
||||
RefreshModsList();
|
||||
}
|
||||
|
||||
private void ModCheckBox_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Mod mod = ((sender as System.Windows.Controls.CheckBox).Tag as Mod);
|
||||
mod.ListItem.IsSelected = false;
|
||||
RefreshModsList();
|
||||
}
|
||||
|
||||
public class Category
|
||||
|
@ -432,6 +430,8 @@ namespace VRCMelonAssistant.Pages
|
|||
}
|
||||
}
|
||||
|
||||
public Visibility PromotionVisibility => string.IsNullOrEmpty(PromotionText) ? Visibility.Collapsed : Visibility.Visible;
|
||||
|
||||
public record CategoryInfo(string Name, string Description)
|
||||
{
|
||||
public string Name { get; } = Name;
|
||||
|
|
Loading…
Reference in a new issue