|
31 | 31 | </ItemsControl.ItemsPanel> |
32 | 32 | <ItemsControl.ItemTemplate> |
33 | 33 | <DataTemplate> |
34 | | - <Grid Width="120" Height="120" Margin="5"> |
| 34 | + <Grid Width="130" Height="140" Margin="5"> |
35 | 35 | <Border BorderThickness="1" BorderBrush="Black" Padding="2" Background="DarkGray"> |
36 | | - <Grid HorizontalAlignment="Stretch"> |
37 | | - <Grid.ColumnDefinitions> |
38 | | - <ColumnDefinition Width="*" /> |
39 | | - </Grid.ColumnDefinitions> |
40 | | - <Grid Grid.Column="0"> |
41 | | - <Grid.RowDefinitions> |
42 | | - <RowDefinition Height="*" /> |
43 | | - <RowDefinition Height="Auto" /> |
44 | | - </Grid.RowDefinitions> |
45 | | - <Viewbox> |
46 | | - <Image Source="{Binding TexturePath, Converter={StaticResource PathToImageValueConverter}}" /> |
47 | | - </Viewbox> |
48 | | - <Grid Grid.Row="0"> |
49 | | - <Grid.RowDefinitions> |
50 | | - <RowDefinition Height="*" /> |
51 | | - <RowDefinition Height="3*" /> |
52 | | - </Grid.RowDefinitions> |
53 | | - <Grid Grid.Row="0"> |
54 | | - <Grid.ColumnDefinitions> |
55 | | - <ColumnDefinition Width="9*" /> |
56 | | - <ColumnDefinition Width="Auto" /> |
57 | | - </Grid.ColumnDefinitions> |
58 | | - <Button Content="X" Grid.Column="1" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:HostKeyList}}, |
| 36 | + <Grid Grid.Column="0"> |
| 37 | + <Grid.RowDefinitions> |
| 38 | + <RowDefinition Height="*" /> |
| 39 | + <RowDefinition Height="auto" /> |
| 40 | + </Grid.RowDefinitions> |
| 41 | + <Image Source="{Binding TexturePath, Converter={StaticResource PathToImageValueConverter}}" /> |
| 42 | + <Grid Grid.Row="0"> |
| 43 | + <Button Grid.Column="0" Width="15" Height="15" Style="{StaticResource delete}" Command="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:HostKeyList}}, |
59 | 44 | Path=DataContext.DeleteKeyCommand}" CommandParameter="{Binding}"></Button> |
60 | | - </Grid> |
61 | | - </Grid> |
62 | | - <ComboBox Grid.Row="1" IsEditable="True" IsTextSearchEnabled="True" IsTextSearchCaseSensitive="False" StaysOpenOnEdit="True" Text="{Binding Name, Mode=TwoWay, Delay=2}" TextSearch.TextPath="" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:HostKeyList}}, |
63 | | - Path=DataContext.HostKeySuggestions.Available}" /> |
64 | 45 | </Grid> |
| 46 | + <StackPanel Grid.Row="2" Orientation="Vertical"> |
| 47 | + <ComboBox IsEditable="True" IsTextSearchEnabled="True" IsTextSearchCaseSensitive="False" StaysOpenOnEdit="True" Text="{Binding Name, Mode=TwoWay, Delay=2}" TextSearch.TextPath="" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:HostKeyList}}, |
| 48 | + Path=DataContext.HostKeySuggestions}" /> |
| 49 | + <ComboBox IsEditable="False" StaysOpenOnEdit="True" SelectedValue="{Binding Tag, Mode=TwoWay, Delay=4}" Foreground="DarkViolet" TextSearch.TextPath="Name" |
| 50 | + ItemsSource="{Binding RelativeSource={RelativeSource AncestorType={x:Type local:HostKeyList}},Path=DataContext.Tags}"> |
| 51 | + <ComboBox.ItemTemplate> |
| 52 | + <DataTemplate> |
| 53 | + <TextBlock VerticalAlignment="Center" Text="{Binding Name}" /> |
| 54 | + </DataTemplate> |
| 55 | + </ComboBox.ItemTemplate> |
| 56 | + </ComboBox> |
| 57 | + </StackPanel> |
65 | 58 | </Grid> |
66 | 59 | </Border> |
67 | 60 | </Grid> |
|
0 commit comments