Material diagram Window was changed

This commit is contained in:
Evgeny Redikultsev
2023-04-30 21:11:07 +05:00
parent df95e84789
commit 3cb6e60fc9
36 changed files with 999 additions and 267 deletions

View File

@@ -12,4 +12,5 @@
<convertersUnits:Moment x:Key="MomentConverter"/>
<convertersUnits:Stress x:Key="StressConverter"/>
<convertersUnits:Curvature x:Key="Curvature"/>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
</ResourceDictionary>

View File

@@ -1,6 +1,6 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DataTemplate x:Key="SourceToTarget">
<Grid>
<Grid.ColumnDefinitions>
@@ -19,4 +19,27 @@
SelectedItem="{Binding SelectedTargetItem}" ItemTemplate="{Binding ItemDataDemplate}"/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="SelectItems">
<StackPanel>
<StackPanel Height="25" Orientation="Horizontal" HorizontalAlignment="Right" Visibility="{Binding ShowButtons, Converter={StaticResource BooleanToVisibilityConverter}}">
<Button Content="Select All" Command="{Binding SelectAllCommand}"/>
<Button Content="Unselect All" Command="{Binding UnSelectAllCommand}"/>
<Button Content="Invert Selection" Command="{Binding InvertSelectionCommand}"/>
</StackPanel>
<ListBox ItemsSource="{Binding CollectionItems}" SelectedItem="SelectedItem">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="22"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding IsSelected}"/>
<ContentControl Grid.Column="1" ContentTemplate="{StaticResource ColoredItemTemplate}" Content="{Binding Item}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
</DataTemplate>
</ResourceDictionary>