|
78 | 78 | <RowDefinition Height="Auto" /> |
79 | 79 | </Grid.RowDefinitions> |
80 | 80 |
|
| 81 | + |
| 82 | + <!-- IDE Friendly Name --> |
| 83 | + <TextBlock |
| 84 | + x:Name="IDEFriendlyName" |
| 85 | + MaxWidth="200" |
| 86 | + VerticalAlignment="Center" |
| 87 | + x:Load="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" |
| 88 | + LineHeight="18" |
| 89 | + Text="{helpers:ResourceString Name=FriendlyName}" |
| 90 | + TextTrimming="CharacterEllipsis" /> |
| 91 | + |
| 92 | + <TextBlock |
| 93 | + Grid.Column="1" |
| 94 | + VerticalAlignment="Center" |
| 95 | + FontWeight="SemiBold" |
| 96 | + Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay}" |
| 97 | + Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource InvertedBoolVisibilityConverter}, Mode=OneWay}" /> |
| 98 | + |
| 99 | + <TextBox |
| 100 | + x:Name="IDEFriendlyNameTextBox" |
| 101 | + Grid.ColumnSpan="2" |
| 102 | + Width="300" |
| 103 | + HorizontalAlignment="Left" |
| 104 | + VerticalAlignment="Center" |
| 105 | + PlaceholderText="{helpers:ResourceString Name=FriendlyName}" |
| 106 | + Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 107 | + Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}"> |
| 108 | + <TextBox.Resources> |
| 109 | + <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="{ThemeResource SolidBackgroundFillColorSecondary}" /> |
| 110 | + <TeachingTip |
| 111 | + x:Name="InvalidFriendlyNameWarning" |
| 112 | + Title="{helpers:ResourceString Name=InvalidFriendlyNameError}" |
| 113 | + IsOpen="{x:Bind ViewModel.IsFriendlyNameValid, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" |
| 114 | + PreferredPlacement="BottomRight" |
| 115 | + Target="{x:Bind IDEFriendlyNameTextBox}" /> |
| 116 | + </TextBox.Resources> |
| 117 | + <TextBox.Header> |
| 118 | + <TextBlock Text="{helpers:ResourceString Name=FriendlyName}" TextTrimming="CharacterEllipsis" /> |
| 119 | + </TextBox.Header> |
| 120 | + </TextBox> |
| 121 | + |
81 | 122 | <!-- IDE Path --> |
82 | 123 | <TextBlock |
83 | 124 | x:Name="IDEPath" |
| 125 | + Grid.Row="1" |
84 | 126 | MaxWidth="200" |
85 | 127 | VerticalAlignment="Center" |
86 | 128 | x:Load="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" |
|
89 | 131 | TextTrimming="CharacterEllipsis" /> |
90 | 132 |
|
91 | 133 | <TextBlock |
| 134 | + Grid.Row="1" |
92 | 135 | Grid.Column="1" |
93 | 136 | VerticalAlignment="Center" |
94 | 137 | FontWeight="SemiBold" |
|
98 | 141 |
|
99 | 142 | <Grid |
100 | 143 | x:Name="IDEPathGrid" |
| 144 | + Grid.Row="1" |
101 | 145 | Grid.ColumnSpan="3" |
102 | | - Margin="0,0,0,8" |
| 146 | + Margin="0,8,0,0" |
103 | 147 | ColumnSpacing="8" |
104 | 148 | Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}"> |
105 | 149 | <Grid.ColumnDefinitions> |
|
124 | 168 | <TextBox.Resources> |
125 | 169 | <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="{ThemeResource SolidBackgroundFillColorSecondary}" /> |
126 | 170 | </TextBox.Resources> |
| 171 | + <TextBox.Header> |
| 172 | + <TextBlock Text="{helpers:ResourceString Name=PathOrAlias}" TextTrimming="CharacterEllipsis" /> |
| 173 | + </TextBox.Header> |
127 | 174 | </TextBox> |
128 | 175 |
|
129 | | - <StackPanel |
130 | | - x:Name="IDEPathButtons" |
| 176 | + <Button |
| 177 | + x:Name="PickIDEExe" |
131 | 178 | Grid.Column="1" |
132 | 179 | VerticalAlignment="Bottom" |
133 | | - Orientation="Horizontal" |
134 | | - Spacing="16"> |
135 | | - <Button |
136 | | - x:Name="PickIDEExe" |
137 | | - Command="{x:Bind ViewModel.OpenFilePickerForIDECommand, Mode=OneWay}" |
138 | | - Content="{helpers:ResourceString Name=Browse}" /> |
139 | | - |
140 | | - <Button |
141 | | - x:Name="TestIDE" |
142 | | - Command="{x:Bind ViewModel.TestIDECommand, Mode=OneWay}" |
143 | | - Content="{helpers:ResourceString Name=Test}" /> |
144 | | - </StackPanel> |
| 180 | + Command="{x:Bind ViewModel.OpenFilePickerForIDECommand, Mode=OneWay}" |
| 181 | + Content="{helpers:ResourceString Name=Browse}" /> |
145 | 182 |
|
146 | 183 | <Grid |
147 | 184 | x:Name="InvalidPathWarning" |
| 185 | + Grid.Row="1" |
148 | 186 | Grid.Column="2" |
149 | | - Padding="12,4" |
150 | | - VerticalAlignment="Stretch" |
| 187 | + Padding="12,6" |
| 188 | + VerticalAlignment="Bottom" |
151 | 189 | x:Load="{x:Bind ViewModel.IsEditingIDEConfig, Mode=OneWay}" |
152 | 190 | Background="{ThemeResource SystemFillColorCriticalBackgroundBrush}" |
153 | 191 | BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
|
183 | 221 | </Grid> |
184 | 222 | </Grid> |
185 | 223 |
|
186 | | - <!-- IDE Friendly Name --> |
187 | | - <TextBlock |
188 | | - x:Name="IDEFriendlyName" |
189 | | - Grid.Row="1" |
190 | | - MaxWidth="200" |
191 | | - VerticalAlignment="Center" |
192 | | - x:Load="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" |
193 | | - LineHeight="18" |
194 | | - Text="{helpers:ResourceString Name=FriendlyName}" |
195 | | - TextTrimming="CharacterEllipsis" /> |
196 | | - |
197 | | - <TextBlock |
198 | | - Grid.Row="1" |
199 | | - Grid.Column="1" |
200 | | - VerticalAlignment="Center" |
201 | | - FontWeight="SemiBold" |
202 | | - Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay}" |
203 | | - Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource InvertedBoolVisibilityConverter}, Mode=OneWay}" /> |
204 | | - |
205 | | - <TextBox |
206 | | - x:Name="IDEFriendlyNameTextBox" |
207 | | - Grid.Row="1" |
208 | | - Grid.ColumnSpan="2" |
209 | | - Width="300" |
210 | | - HorizontalAlignment="Left" |
211 | | - VerticalAlignment="Center" |
212 | | - PlaceholderText="{helpers:ResourceString Name=FriendlyName}" |
213 | | - Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
214 | | - Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}"> |
215 | | - <TextBox.Resources> |
216 | | - <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="{ThemeResource SolidBackgroundFillColorSecondary}" /> |
217 | | - <TeachingTip |
218 | | - x:Name="InvalidFriendlyNameWarning" |
219 | | - Title="{helpers:ResourceString Name=InvalidFriendlyNameError}" |
220 | | - IsOpen="{x:Bind ViewModel.IsFriendlyNameValid, Converter={StaticResource BoolNegationConverter}, Mode=OneWay}" |
221 | | - PreferredPlacement="Bottom" |
222 | | - Target="{x:Bind IDEFriendlyNameTextBox}" /> |
223 | | - </TextBox.Resources> |
224 | | - </TextBox> |
225 | | - |
226 | 224 | <!-- Edit --> |
227 | 225 | <Button |
228 | 226 | x:Name="EditIDEConfigButton" |
|
242 | 240 | HorizontalAlignment="Right" |
243 | 241 | x:Load="{x:Bind ViewModel.IsEditingIDEConfig, Mode=OneWay}" |
244 | 242 | Orientation="Horizontal" |
245 | | - Spacing="12"> |
| 243 | + Spacing="8"> |
246 | 244 | <!-- Cancel --> |
247 | 245 | <Button Command="{x:Bind ViewModel.CancelIDEChangesCommand, Mode=OneWay}" Content="{helpers:ResourceString Name=Cancel}" /> |
248 | 246 |
|
| 247 | + <!-- Test Integration --> |
| 248 | + <Button |
| 249 | + x:Name="TestIDE" |
| 250 | + Command="{x:Bind ViewModel.TestIDECommand, Mode=OneWay}" |
| 251 | + Content="{helpers:ResourceString Name=TestIntegration}" /> |
| 252 | + |
249 | 253 | <!-- Save Changes --> |
250 | 254 | <Button |
251 | 255 | Command="{x:Bind ViewModel.SaveIDEChangesCommand, Mode=OneWay}" |
|
293 | 297 | <Setter Target="IDEFriendlyNameTextBox.Width" Value="300" /> |
294 | 298 | <Setter Target="IDEFriendlyNameTextBox.HorizontalAlignment" Value="Left" /> |
295 | 299 | <Setter Target="IDEFriendlyNameTextBox.(Grid.ColumnSpan)" Value="2" /> |
296 | | - <Setter Target="IDEPathButtons.(Grid.Column)" Value="1" /> |
297 | | - <Setter Target="IDEPathButtons.(Grid.Row)" Value="0" /> |
298 | | - <Setter Target="IDEPathButtons.Orientation" Value="Horizontal" /> |
299 | | - <Setter Target="IDEPathButtons.Spacing" Value="16" /> |
| 300 | + <Setter Target="PickIDEExe.(Grid.Column)" Value="1" /> |
| 301 | + <Setter Target="PickIDEExe.(Grid.Row)" Value="0" /> |
300 | 302 | <Setter Target="InvalidPathWarning.(Grid.Column)" Value="2" /> |
301 | 303 | <Setter Target="InvalidPathWarning.(Grid.Row)" Value="0" /> |
| 304 | + <Setter Target="InvalidPathWarning.VerticalAlignment" Value="Bottom" /> |
302 | 305 | <Setter Target="IDEPathGrid.RowSpacing" Value="0" /> |
303 | 306 | <Setter Target="IDEPathGrid.ColumnSpacing" Value="8" /> |
| 307 | + <Setter Target="InvalidFriendlyNameWarning.PreferredPlacement" Value="BottomRight" /> |
304 | 308 | </VisualState.Setters> |
305 | 309 | </VisualState> |
306 | 310 | <VisualState x:Name="CompactState"> |
|
311 | 315 | <Setter Target="IDEFriendlyNameTextBox.Width" Value="Auto" /> |
312 | 316 | <Setter Target="IDEFriendlyNameTextBox.HorizontalAlignment" Value="Stretch" /> |
313 | 317 | <Setter Target="IDEFriendlyNameTextBox.(Grid.ColumnSpan)" Value="3" /> |
314 | | - <Setter Target="IDEPathButtons.(Grid.Column)" Value="3" /> |
315 | | - <Setter Target="IDEPathButtons.(Grid.Row)" Value="1" /> |
316 | | - <Setter Target="IDEPathButtons.Orientation" Value="Vertical" /> |
317 | | - <Setter Target="IDEPathButtons.Spacing" Value="8" /> |
| 318 | + <Setter Target="PickIDEExe.(Grid.Column)" Value="3" /> |
| 319 | + <Setter Target="PickIDEExe.(Grid.Row)" Value="1" /> |
318 | 320 | <Setter Target="InvalidPathWarning.(Grid.Column)" Value="3" /> |
319 | 321 | <Setter Target="InvalidPathWarning.(Grid.Row)" Value="2" /> |
| 322 | + <Setter Target="InvalidPathWarning.VerticalAlignment" Value="Stretch" /> |
320 | 323 | <Setter Target="IDEPathGrid.RowSpacing" Value="12" /> |
321 | 324 | <Setter Target="IDEPathGrid.ColumnSpacing" Value="0" /> |
| 325 | + <Setter Target="InvalidFriendlyNameWarning.PreferredPlacement" Value="Bottom" /> |
322 | 326 | </VisualState.Setters> |
323 | 327 | </VisualState> |
324 | 328 | </VisualStateGroup> |
|
0 commit comments