Files
egtstone3d/TopPanel/TopPanelHomeV.xaml
2025-01-31 16:49:02 +01:00

80 lines
3.4 KiB
XML

<Grid x:Class="TopPanelHomeV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Command="{Binding NewFileCmd}"
Style="{DynamicResource ProjManager_Btn}">
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
<Image Source="/Resources/ProjManager/newfile.png"
Style="{StaticResource TopPanel_Image}"/>
<TextBlock Text="{Binding NewFile_Msg}"
Style="{StaticResource TopPanel_TxBl}"/>
</StackPanel>
</Button>
<Button Grid.Column="1"
Command="{Binding SaveFileCmd}"
Style="{DynamicResource TopPanel_Btn}">
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
<Image Source="/Resources/ProjManager/save.png"
Style="{StaticResource TopPanel_Image}"/>
<TextBlock Text="{Binding Save_Msg}"
Style="{StaticResource TopPanel_TxBl}"/>
</StackPanel>
</Button>
<Button Grid.Column="2"
IsEnabled="True"
Command="{Binding SaveAsCommand}"
Style="{DynamicResource TopPanel_Btn}">
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
<Image Source="/Resources/ProjManager/saveas.png"
Style="{StaticResource TopPanel_Image}"/>
<TextBlock Text="{Binding SaveAs_Msg}"
Style="{StaticResource TopPanel_TxBl}"/>
</StackPanel>
</Button>
<Button Grid.Column="3"
Command="{Binding OpenFileCmd}"
Tag="{Binding}"
Style="{DynamicResource TopPanel_Btn}">
<Button.ContextMenu>
<ContextMenu ItemsSource="{Binding MruFileNames}"
Style="{StaticResource EgtStone3D_ContextMenu}">
<ContextMenu.Resources>
<Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource EgtStone3D_MenuItem}">
<Setter Property="Command"
Value="{Binding PlacementTarget.Tag.OpenMruFileCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Setter Property="CommandParameter" Value="{Binding}"/>
</Style>
</ContextMenu.Resources>
</ContextMenu>
</Button.ContextMenu>
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
<Image Source="/Resources/ProjManager/folder.png"
Style="{StaticResource TopPanel_Image}"/>
<TextBlock Text="{Binding Open_Msg}"
Style="{StaticResource TopPanel_TxBl}"/>
</StackPanel>
</Button>
<Button Grid.Column="4"
Command="{Binding OptionsCommand}"
Style="{DynamicResource TopPanel_Btn}">
<StackPanel Style="{StaticResource TopPanel_StackPanel}">
<Image Source="/Resources/ProjManager/settings.png"
Style="{StaticResource TopPanel_Image}"/>
<TextBlock Text="{Binding Options_Msg}"
Style="{StaticResource TopPanel_TxBl}"/>
</StackPanel>
</Button>
</Grid>