|
59 | 59 | ItemsSource="{x:Bind ViewModel.OpenInIDEOptions.Values}" |
60 | 60 | SelectedItem="{x:Bind ViewModel.SelectedOpenInIDEOption, Mode=TwoWay}" /> |
61 | 61 | <local:SettingsBlockControl.ExpandableContent> |
62 | | - <Grid |
63 | | - x:Name="IDEConfigGrid" |
64 | | - Padding="32,12" |
65 | | - ColumnSpacing="16"> |
66 | | - <Grid.ColumnDefinitions> |
67 | | - <ColumnDefinition Width="Auto" /> |
68 | | - <ColumnDefinition Width="*" /> |
69 | | - <ColumnDefinition Width="Auto" /> |
70 | | - </Grid.ColumnDefinitions> |
71 | | - <TextBlock |
72 | | - x:Name="TagName" |
73 | | - MaxWidth="200" |
74 | | - VerticalAlignment="Center" |
75 | | - LineHeight="18" |
76 | | - Text="{helpers:ResourceString Name=DefaultIDE}" |
77 | | - TextTrimming="CharacterEllipsis" /> |
78 | | - |
79 | | - <TextBlock |
80 | | - Grid.Column="1" |
81 | | - VerticalAlignment="Center" |
82 | | - FontWeight="SemiBold" |
83 | | - Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay}" |
84 | | - Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource InvertedBoolVisibilityConverter}, Mode=OneWay}" /> |
| 62 | + <StackPanel Orientation="Vertical"> |
| 63 | + <Grid |
| 64 | + x:Name="IDEConfigGrid" |
| 65 | + Padding="32,12" |
| 66 | + ColumnSpacing="16" |
| 67 | + RowSpacing="12"> |
| 68 | + <Grid.ColumnDefinitions> |
| 69 | + <ColumnDefinition Width="Auto" /> |
| 70 | + <ColumnDefinition Width="*" /> |
| 71 | + <ColumnDefinition Width="Auto" /> |
| 72 | + </Grid.ColumnDefinitions> |
| 73 | + <Grid.RowDefinitions> |
| 74 | + <RowDefinition Height="*" /> |
| 75 | + <RowDefinition Height="*" /> |
| 76 | + </Grid.RowDefinitions> |
| 77 | + <TextBlock |
| 78 | + x:Name="IDEPath" |
| 79 | + MaxWidth="200" |
| 80 | + VerticalAlignment="Center" |
| 81 | + LineHeight="18" |
| 82 | + Text="{helpers:ResourceString Name=PathOrAlias}" |
| 83 | + TextTrimming="CharacterEllipsis" /> |
| 84 | + |
| 85 | + <TextBlock |
| 86 | + Grid.Column="1" |
| 87 | + VerticalAlignment="Center" |
| 88 | + FontWeight="SemiBold" |
| 89 | + Text="{x:Bind ViewModel.IDEPath, Mode=TwoWay}" |
| 90 | + TextTrimming="CharacterEllipsis" |
| 91 | + Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource InvertedBoolVisibilityConverter}, Mode=OneWay}" /> |
| 92 | + |
| 93 | + <StackPanel |
| 94 | + Grid.Column="1" |
| 95 | + Orientation="Horizontal" |
| 96 | + Spacing="8" |
| 97 | + Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}"> |
| 98 | + <TextBox |
| 99 | + x:Name="IDEPathTextBox" |
| 100 | + Width="300" |
| 101 | + VerticalAlignment="Center" |
| 102 | + Text="{x:Bind ViewModel.IDEPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> |
| 103 | + <TextBox.Resources> |
| 104 | + <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="{ThemeResource SolidBackgroundFillColorSecondary}" /> |
| 105 | + </TextBox.Resources> |
| 106 | + </TextBox> |
| 107 | + |
| 108 | + <Button |
| 109 | + x:Name="PickIDEExe" |
| 110 | + Command="{x:Bind ViewModel.OpenFilePickerForIDECommand, Mode=OneWay}" |
| 111 | + Content="{helpers:ResourceString Name=Browse}" /> |
| 112 | + </StackPanel> |
| 113 | + |
| 114 | + <TextBlock |
| 115 | + x:Name="IDEFriendlyName" |
| 116 | + Grid.Row="1" |
| 117 | + MaxWidth="200" |
| 118 | + VerticalAlignment="Center" |
| 119 | + LineHeight="18" |
| 120 | + Text="{helpers:ResourceString Name=FriendlyName}" |
| 121 | + TextTrimming="CharacterEllipsis" /> |
| 122 | + |
| 123 | + <TextBlock |
| 124 | + Grid.Row="1" |
| 125 | + Grid.Column="1" |
| 126 | + VerticalAlignment="Center" |
| 127 | + FontWeight="SemiBold" |
| 128 | + Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay}" |
| 129 | + Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource InvertedBoolVisibilityConverter}, Mode=OneWay}" /> |
85 | 130 |
|
86 | | - <StackPanel |
87 | | - Grid.Column="1" |
88 | | - Orientation="Horizontal" |
89 | | - Spacing="8" |
90 | | - Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}"> |
91 | 131 | <TextBox |
92 | 132 | x:Name="IDEFriendlyNameTextBox" |
93 | | - Width="200" |
| 133 | + Grid.Row="1" |
| 134 | + Grid.Column="1" |
| 135 | + Width="300" |
| 136 | + HorizontalAlignment="Left" |
94 | 137 | VerticalAlignment="Center" |
95 | | - Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> |
| 138 | + Text="{x:Bind ViewModel.IDEFriendlyName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
| 139 | + Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}"> |
96 | 140 | <TextBox.Resources> |
97 | 141 | <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="{ThemeResource SolidBackgroundFillColorSecondary}" /> |
98 | 142 | </TextBox.Resources> |
99 | 143 | </TextBox> |
100 | 144 |
|
101 | | - <Button |
102 | | - x:Name="PickIDEExe" |
103 | | - Grid.Column="1" |
104 | | - Command="{x:Bind ViewModel.OpenFilePickerForIDECommand, Mode=OneWay}" |
105 | | - Content="{helpers:ResourceString Name=Browse}" /> |
106 | | - </StackPanel> |
107 | | - |
108 | | - <Button |
109 | | - x:Name="EditIDEConfigButton" |
110 | | - Grid.Column="2" |
111 | | - Padding="8,4" |
112 | | - Background="Transparent" |
113 | | - BorderBrush="Transparent" |
114 | | - Command="{x:Bind ViewModel.StartEditingIDECommand, Mode=OneWay}" |
115 | | - Content="{helpers:ResourceString Name=Edit}" |
116 | | - Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource InvertedBoolVisibilityConverter}, Mode=OneWay}" /> |
117 | | - |
118 | | - <StackPanel |
119 | | - Grid.Column="2" |
120 | | - Orientation="Horizontal" |
121 | | - Spacing="12" |
122 | | - Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource BoolVisibilityConverter}, Mode=OneWay}"> |
123 | 145 | <Grid |
| 146 | + x:Name="InvalidFriendlyNameWarning" |
| 147 | + Grid.Row="1" |
| 148 | + Grid.Column="2" |
124 | 149 | Padding="12,4" |
125 | 150 | VerticalAlignment="Stretch" |
| 151 | + x:Load="{x:Bind ViewModel.IsEditingIDEConfig, Mode=OneWay}" |
126 | 152 | Background="{ThemeResource SystemFillColorCriticalBackgroundBrush}" |
127 | 153 | BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
128 | 154 | BorderThickness="1" |
|
153 | 179 | Text="{helpers:ResourceString Name=InvalidTagNameWarning}" /> |
154 | 180 | </Grid> |
155 | 181 |
|
| 182 | + <!-- Edit --> |
| 183 | + <Button |
| 184 | + x:Name="EditIDEConfigButton" |
| 185 | + Grid.RowSpan="2" |
| 186 | + Grid.Column="2" |
| 187 | + Padding="8,4" |
| 188 | + Background="Transparent" |
| 189 | + BorderBrush="Transparent" |
| 190 | + Command="{x:Bind ViewModel.StartEditingIDECommand, Mode=OneWay}" |
| 191 | + Content="{helpers:ResourceString Name=Edit}" |
| 192 | + Visibility="{x:Bind ViewModel.IsEditingIDEConfig, Converter={StaticResource InvertedBoolVisibilityConverter}, Mode=OneWay}" /> |
| 193 | + </Grid> |
| 194 | + |
| 195 | + <StackPanel |
| 196 | + x:Name="SaveAndEditButtons" |
| 197 | + Padding="32,0,32,12" |
| 198 | + HorizontalAlignment="Right" |
| 199 | + x:Load="{x:Bind ViewModel.IsEditingIDEConfig, Mode=OneWay}" |
| 200 | + Orientation="Horizontal" |
| 201 | + Spacing="12"> |
156 | 202 | <!-- Cancel --> |
157 | 203 | <Button Command="{x:Bind ViewModel.CancelIDEChangesCommand, Mode=OneWay}" Content="{helpers:ResourceString Name=Cancel}" /> |
158 | 204 |
|
|
163 | 209 | IsEnabled="{x:Bind ViewModel.CanSaveIDEChanges, Mode=OneWay}" |
164 | 210 | Style="{StaticResource AccentButtonStyle}" /> |
165 | 211 | </StackPanel> |
166 | | - </Grid> |
| 212 | + </StackPanel> |
167 | 213 | </local:SettingsBlockControl.ExpandableContent> |
168 | 214 | </local:SettingsBlockControl> |
169 | 215 |
|
|
0 commit comments