JD2022-TU1/main/tools/modules/JD.Shotgun.WPF/Views/ShotgunMapExplorerView.xaml

50 lines
2.9 KiB
XML

<UserControl x:Class="JD.Shotgun.WPF.Views.ShotgunMapExplorerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:converters="clr-namespace:JD.Shotgun.WPF.Views.Converters"
mc:Ignorable="d"
x:Name="ExplorerViewControl"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<converters:IconToImageSourceConverter x:Key="IconToImageSourceConverter"></converters:IconToImageSourceConverter>
</UserControl.Resources>
<Grid Margin="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Image Grid.Row="0" x:Name="Thumbnail" Stretch="Uniform" MaxHeight="150" MinHeight="150" HorizontalAlignment="Center" MinWidth="100"></Image>
<TextBlock Grid.Row="1" Text="Projects" Margin="0 10"></TextBlock>
<ComboBox x:Name="ComboBoxOpus" Grid.Row="2" SelectionChanged="ComboBoxOpus_OnSelectionChanged"></ComboBox>
<TextBlock Grid.Row="3" Text="Maps" Margin="0 10"></TextBlock>
<ComboBox x:Name="ComboBoxMaps" Grid.Row="4" SelectionChanged="ComboBoxMaps_OnSelectionChanged"></ComboBox>
<ItemsControl Grid.Row="5" Margin="0 30 0 0" ItemsSource="{Binding ElementName=ExplorerViewControl, Path=Actions}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0 8 0 0" >
<Image Source="{Binding Icon, Converter={StaticResource IconToImageSourceConverter}}" Width="16" Height="16" Margin="0 0 5 0" VerticalAlignment="Center"></Image>
<TextBlock ToolTip="{Binding Description}" VerticalAlignment="Center">
<Hyperlink Command="{Binding Command}">
<TextBlock Text="{Binding Path=Text}"/>
</Hyperlink>
</TextBlock>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</UserControl>