Merge pull request #588 from irihitech/selection
Fix various issues for SelectionList
This commit is contained in:
@@ -12,10 +12,14 @@
|
||||
x:DataType="vm:SelectionListDemoViewModel"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<u:SelectionList ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}">
|
||||
<u:SelectionList
|
||||
Width="600"
|
||||
HorizontalAlignment="Center"
|
||||
ItemsSource="{Binding Items}"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<u:SelectionList.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</u:SelectionList.ItemsPanel>
|
||||
</u:SelectionList>
|
||||
@@ -36,9 +40,9 @@
|
||||
<DataTemplate>
|
||||
<Panel Height="40">
|
||||
<TextBlock
|
||||
Classes.Active="{Binding $parent[u:SelectionListItem].IsSelected, Mode=OneWay}"
|
||||
Margin="8,0"
|
||||
VerticalAlignment="Center"
|
||||
Classes.Active="{Binding $parent[u:SelectionListItem].IsSelected, Mode=OneWay}"
|
||||
Text="{Binding}">
|
||||
<TextBlock.Styles>
|
||||
<Style Selector="TextBlock.Active">
|
||||
@@ -50,6 +54,14 @@
|
||||
</DataTemplate>
|
||||
</u:SelectionList.ItemTemplate>
|
||||
</u:SelectionList>
|
||||
<Button Command="{Binding Clear}">Clear</Button>
|
||||
<SplitButton Content="Button With Selection">
|
||||
<SplitButton.Flyout>
|
||||
<Flyout>
|
||||
<u:SelectionList ItemsSource="{Binding Items}" SelectedItem="{Binding SelectedItem}" />
|
||||
</Flyout>
|
||||
</SplitButton.Flyout>
|
||||
</SplitButton>
|
||||
<Button Margin="0 12" Command="{Binding Clear}">Clear</Button>
|
||||
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user