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