Files
EgtDOORCreator/CompoPanel/CompoPanelV.xaml
2022-11-07 15:55:19 +01:00

63 lines
2.2 KiB
XML

<UserControl x:Class="CompoPanelV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtDOORCreator="clr-namespace:EgtDOORCreator">
<UserControl.InputBindings>
<KeyBinding Key="Enter" Command="{Binding RefreshCmd}"/>
</UserControl.InputBindings>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="16*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ItemsControl ItemsSource="{Binding CompoTypeList}" Focusable="True"
Visibility="{Binding IsVisible}" IsEnabled="{Binding EnableModify}">
<ItemsControl.InputBindings>
<KeyBinding Key="Enter" Command="{Binding RefreshCmd}"/>
</ItemsControl.InputBindings>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="1"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Button Name="Compo" Content="{Binding Name}"
Command="{Binding DataContext.CompoBtnCommand,
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding}"
Focusable="False">
<Button.ToolTip>
<Image Source="{Binding ImageDoorHardware}"
MaxHeight="100"
MaxWidth="100"
Stretch="Uniform"/>
</Button.ToolTip>
</Button>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Button Grid.Row="1"
Name="GoToAssembly"
Command="{Binding DataContext.GoToAssemblyBtnCommand,
RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
CommandParameter="{Binding}"
Visibility="{Binding GoBackVisibility}"
MaxHeight="40"
Focusable="False">
<Image Source="/Resources/Refresh/BackArrow.png" Stretch="Uniform"/>
</Button>
</Grid>
</UserControl>