Files
egtstone3d/TopPanel/TopPanelButtonV.xaml
T
Demetrio Cassarino 7e647a1552 -sistemato converter
-aggiunto nuovo tab
2025-01-24 14:45:09 +01:00

50 lines
2.0 KiB
XML

<Grid x:Class="TopPanelButtonV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:EgtStone3D="clr-namespace:EgtStone3D"
Margin="15,-10,0,0"
x:Name="TopPanelButtonGrid">
<Grid.Resources>
<EgtStone3D:SplitConverter x:Key="SplitConverter"/>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<TextBlock Name="IndexTopList" Visibility="Collapsed"/>
<ItemsControl ItemsSource="{Binding TopPanelListBtn}"
Style="{DynamicResource TopList_ItemsControl}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal"
Width="{Binding ActualWidth,ElementName=TopPanelButtonGrid, Converter={StaticResource SplitConverter},ConverterParameter={x:Reference IndexTopList}}"/>
</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}"/>-->
<EgtStone3D:SVGV FileSource="{Binding Img}"/>
</Button>
</DataTemplate>
<DataTemplate DataType="{x:Type EgtStone3D:_ToggleButton}">
<ToggleButton Command="{Binding CmdBtn}"
IsChecked="{Binding IsChecked}"
Style="{DynamicResource SceneToggleButton}">
<!--<Image Source="{Binding Img}"/>-->
<EgtStone3D:SVGV FileSource="{Binding Img}"/>
</ToggleButton>
</DataTemplate>
</ItemsControl.Resources>
</ItemsControl>
<TextBlock Grid.Row="1"
Text="{Binding SubTitle}"
Style="{StaticResource TopPanel_TxBl}"/>
</Grid>