Created
November 6, 2021 01:42
-
-
Save julesx/4794b289cb9726d759d1406a941832fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ListBox x:Class="PG.UserControls.ListBoxPgItems" | |
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:classes="clr-namespace:WPF.Core.Classes;assembly=WPF.Core" | |
mc:Ignorable="d" | |
SelectionMode="Extended" | |
Style="{StaticResource MaterialDesignListBox}" | |
xmlns:controls="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel" | |
xmlns:i="http://schemas.microsoft.com/xaml/behaviors" | |
xmlns:behaviors="clr-namespace:WPF.Core.Behaviors;assembly=WPF.Core" | |
d:DesignHeight="450" d:DesignWidth="800"> | |
<i:Interaction.Behaviors> | |
<behaviors:MultiSelectionBehavior SelectedItems="{Binding SelectedPgItems}" /> | |
</i:Interaction.Behaviors> | |
<ListBox.Resources> | |
<ResourceDictionary> | |
<Style x:Key="ListBoxPgItemStyle" BasedOn="{StaticResource MaterialDesignCardsListBoxItem}" TargetType="ListBoxItem"> | |
<Setter Property="Height" Value="{Binding DataContext.ListBoxItemHeight, Source={classes:RootObject}}" /> | |
<Setter Property="Width" Value="{Binding DataContext.ListBoxItemWidth, Source={classes:RootObject}}" /> | |
<EventSetter Event="PreviewMouseDoubleClick" Handler="ListBoxItem_PreviewMouseDoubleClick" /> | |
</Style> | |
</ResourceDictionary> | |
</ListBox.Resources> | |
<ListBox.ItemsPanel> | |
<ItemsPanelTemplate> | |
<controls:VirtualizingWrapPanel SpacingMode="StartAndEndOnly" /> | |
</ItemsPanelTemplate> | |
</ListBox.ItemsPanel> | |
</ListBox> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment