Files
egtstone3d/SceneButton/SceneButtonV.xaml
T
2025-01-02 18:18:32 +01:00

116 lines
5.3 KiB
XML

<UserControl x:Class="SceneButtonV"
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<DockPanel>
<!--TOP-->
<ItemsControl ItemsSource="{Binding TopListBtn}" DockPanel.Dock="Top" HorizontalAlignment="left">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
<Button ToolTip="{Binding Name}"
IsEnabled="{Binding IsEnabled}"
Command="{Binding CmdBtn}" Style="{DynamicResource SceneButton}">
<Image Source="{Binding Img}" Stretch="UniformToFill"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
<ToggleButton Content="{Binding Name}"
Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}" Style="{DynamicResource SceneToggleButton}"/>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
<!--BOTTOM-->
<ItemsControl ItemsSource="{Binding BottomListBtn}" DockPanel.Dock="Bottom" HorizontalAlignment="Right" Margin="0,0,0,34">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
<Button Content="{Binding Name}"
Command="{Binding CmdBtn}" Style="{DynamicResource SceneButton}"/>
</DataTemplate>
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
<ToggleButton Content="{Binding Name}"
Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}" Style="{DynamicResource SceneToggleButton}"/>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
<!--RIGHT-->
<ItemsControl ItemsSource="{Binding RightListBtn}" DockPanel.Dock="Right" HorizontalAlignment="Right" Margin="0,-32,4,0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
<Button Content="{Binding Name}"
Command="{Binding CmdBtn}" Style="{DynamicResource SceneButton}"/>
</DataTemplate>
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
<ToggleButton Content="{Binding Name}"
Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}" Style="{DynamicResource SceneToggleButton}"/>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
<!--LEFT colonna 1-->
<ItemsControl ItemsSource="{Binding LeftListBtn}" DockPanel.Dock="Left" HorizontalAlignment="Right">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Resources>
<DataTemplate DataType="{x:Type EgtStone3D:_Button}">
<Button ToolTip="{Binding Name}"
IsEnabled="{Binding IsEnabled}"
Command="{Binding CmdBtn}" Style="{DynamicResource SceneButton}">
<Image Source="{Binding Img}" Stretch="UniformToFill"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
<ToggleButton Content="{Binding Name}"
Command="{Binding CmdBtn}" IsChecked="{Binding IsChecked}" Style="{DynamicResource SceneToggleButton}"/>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
<Grid Background="Transparent" Name ="MainGrid">
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!--<EgtStone3D:PairV Grid.Row="0" Grid.Column="0"
Grid.RowSpan="2" Grid.ColumnSpan="2"/>-->
</Grid>
</DockPanel>
</UserControl>