|
20 | 20 | <ResourceDictionary>
|
21 | 21 | <cmdpalUI:KeyChordToStringConverter x:Key="KeyChordToStringConverter" />
|
22 | 22 |
|
23 |
| - <Grid x:Name="GridLayout" RowSpacing="4" /> |
24 |
| - |
25 | 23 | <cmdpalUI:ContextItemTemplateSelector
|
26 | 24 | x:Key="ContextItemTemplateSelector"
|
27 | 25 | Critical="{StaticResource CriticalContextMenuViewModelTemplate}"
|
|
30 | 28 |
|
31 | 29 | <!-- Template for context items in the context item menu -->
|
32 | 30 | <DataTemplate x:Key="DefaultContextMenuViewModelTemplate" x:DataType="viewmodels:CommandContextItemViewModel">
|
33 |
| - <Grid AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"> |
| 31 | + <Grid AutomationProperties.Name="{x:Bind Title}"> |
34 | 32 | <Grid.ColumnDefinitions>
|
35 | 33 | <ColumnDefinition Width="32" />
|
36 | 34 | <ColumnDefinition Width="*" />
|
37 | 35 | <ColumnDefinition Width="Auto" />
|
38 | 36 | </Grid.ColumnDefinitions>
|
39 |
| - |
40 | 37 | <cpcontrols:IconBox
|
41 | 38 | Width="16"
|
42 | 39 | Height="16"
|
43 | 40 | Margin="4,0,0,0"
|
44 | 41 | HorizontalAlignment="Left"
|
45 |
| - SourceKey="{x:Bind Icon, Mode=OneWay}" |
| 42 | + SourceKey="{x:Bind Icon}" |
46 | 43 | SourceRequested="{x:Bind help:IconCacheProvider.SourceRequested}" />
|
47 | 44 | <TextBlock
|
48 | 45 | Grid.Column="1"
|
49 | 46 | VerticalAlignment="Center"
|
50 |
| - Text="{x:Bind Title, Mode=OneWay}" /> |
| 47 | + Text="{x:Bind Title}" /> |
51 | 48 | <TextBlock
|
52 | 49 | Grid.Column="2"
|
53 | 50 | Margin="16,0,0,0"
|
54 | 51 | HorizontalAlignment="Right"
|
55 | 52 | VerticalAlignment="Center"
|
56 | 53 | Foreground="{ThemeResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"
|
57 | 54 | Style="{StaticResource CaptionTextBlockStyle}"
|
58 |
| - Text="{x:Bind RequestedShortcut, Mode=OneWay, Converter={StaticResource KeyChordToStringConverter}}" /> |
| 55 | + Text="{x:Bind RequestedShortcut, Converter={StaticResource KeyChordToStringConverter}}" /> |
59 | 56 | </Grid>
|
60 | 57 | </DataTemplate>
|
61 | 58 |
|
62 | 59 | <!-- Template for context items flagged as critical -->
|
63 | 60 | <DataTemplate x:Key="CriticalContextMenuViewModelTemplate" x:DataType="viewmodels:CommandContextItemViewModel">
|
64 |
| - <Grid AutomationProperties.Name="{x:Bind Title, Mode=OneWay}"> |
| 61 | + <Grid AutomationProperties.Name="{x:Bind Title}"> |
65 | 62 | <Grid.ColumnDefinitions>
|
66 | 63 | <ColumnDefinition Width="32" />
|
67 | 64 | <ColumnDefinition Width="*" />
|
68 | 65 | <ColumnDefinition Width="Auto" />
|
69 | 66 | </Grid.ColumnDefinitions>
|
70 |
| - |
71 | 67 | <cpcontrols:IconBox
|
72 | 68 | Width="16"
|
73 | 69 | Height="16"
|
74 | 70 | Margin="4,0,0,0"
|
75 | 71 | HorizontalAlignment="Left"
|
76 | 72 | Foreground="{ThemeResource SystemFillColorCriticalBrush}"
|
77 |
| - SourceKey="{x:Bind Icon, Mode=OneWay}" |
| 73 | + SourceKey="{x:Bind Icon}" |
78 | 74 | SourceRequested="{x:Bind help:IconCacheProvider.SourceRequested}" />
|
79 | 75 | <TextBlock
|
80 | 76 | Grid.Column="1"
|
81 | 77 | VerticalAlignment="Center"
|
82 | 78 | Style="{StaticResource ContextItemTitleTextBlockCriticalStyle}"
|
83 |
| - Text="{x:Bind Title, Mode=OneWay}" /> |
| 79 | + Text="{x:Bind Title}" /> |
84 | 80 | <TextBlock
|
85 | 81 | Grid.Column="2"
|
86 | 82 | Margin="16,0,0,0"
|
87 | 83 | HorizontalAlignment="Right"
|
88 | 84 | VerticalAlignment="Center"
|
89 | 85 | Style="{StaticResource ContextItemCaptionTextBlockCriticalStyle}"
|
90 |
| - Text="{x:Bind RequestedShortcut, Mode=OneWay, Converter={StaticResource KeyChordToStringConverter}}" /> |
| 86 | + Text="{x:Bind RequestedShortcut, Converter={StaticResource KeyChordToStringConverter}}" /> |
91 | 87 | </Grid>
|
92 | 88 | </DataTemplate>
|
93 | 89 |
|
94 | 90 | <!-- Template for context item separators -->
|
95 | 91 | <DataTemplate x:Key="SeparatorContextMenuViewModelTemplate" x:DataType="viewmodels:SeparatorContextItemViewModel">
|
96 |
| - <StackPanel Margin="0,0,0,0" Orientation="Vertical"> |
97 |
| - <Border |
98 |
| - Margin="0,0,0,0" |
99 |
| - BorderBrush="{ThemeResource MenuFlyoutSeparatorThemeBrush}" |
100 |
| - BorderThickness="0,0,0,1" /> |
101 |
| - </StackPanel> |
| 92 | + <Rectangle |
| 93 | + Fill="{ThemeResource MenuFlyoutSeparatorThemeBrush}" |
| 94 | + Height="1" |
| 95 | + Margin="-16, -12, -12, -12" |
| 96 | + /> |
102 | 97 | </DataTemplate>
|
103 | 98 | </ResourceDictionary>
|
104 | 99 | </UserControl.Resources>
|
|
122 | 117 | <ListView.ItemContainerStyle>
|
123 | 118 | <Style BasedOn="{StaticResource DefaultListViewItemStyle}" TargetType="ListViewItem">
|
124 | 119 | <Setter Property="MinHeight" Value="0" />
|
125 |
| - <Setter Property="Padding" Value="12,7,12,7" /> |
| 120 | + <Setter Property="Padding" Value="12, 8"/> |
126 | 121 | </Style>
|
127 | 122 | </ListView.ItemContainerStyle>
|
128 | 123 | <ListView.ItemContainerTransitions>
|
|
134 | 129 | x:Name="ContextFilterBox"
|
135 | 130 | x:Uid="ContextFilterBox"
|
136 | 131 | KeyDown="ContextFilterBox_KeyDown"
|
| 132 | + Margin="4" |
137 | 133 | PreviewKeyDown="ContextFilterBox_PreviewKeyDown"
|
138 | 134 | TextChanged="ContextFilterBox_TextChanged" />
|
139 | 135 | <VisualStateManager.VisualStateGroups>
|
|
145 | 141 | <VisualState.Setters>
|
146 | 142 | <Setter Target="CommandsPanel.(Grid.Row)" Value="1" />
|
147 | 143 | <Setter Target="ContextFilterBox.(Grid.Row)" Value="0" />
|
148 |
| - <Setter Target="CommandsDropdown.Margin" Value="-16,0,-16,-13" /> |
149 |
| - <Setter Target="ContextFilterBox.Margin" Value="-12,-10,-12,3" /> |
| 144 | + <Setter Target="CommandsDropdown.Margin" Value="0, 0, 0, 4" /> |
150 | 145 | </VisualState.Setters>
|
151 | 146 | </VisualState>
|
152 | 147 | <VisualState x:Name="FilterOnBottom">
|
|
156 | 151 | <VisualState.Setters>
|
157 | 152 | <Setter Target="CommandsPanel.(Grid.Row)" Value="0" />
|
158 | 153 | <Setter Target="ContextFilterBox.(Grid.Row)" Value="1" />
|
159 |
| - <Setter Target="CommandsDropdown.Margin" Value="-16,-12,-16,-12" /> |
160 |
| - <Setter Target="ContextFilterBox.Margin" Value="-12,14,-12,-9" /> |
| 154 | + <Setter Target="CommandsDropdown.Margin" Value="0, 4, 0, 0" /> |
161 | 155 | </VisualState.Setters>
|
162 | 156 | </VisualState>
|
163 | 157 | </VisualStateGroup>
|
|
0 commit comments