|
16 | 16 | Background="Transparent" |
17 | 17 | AllowsTransparency="True" |
18 | 18 | d:DataContext="{d:DesignInstance alternativeCredential:AlternativeCredentialEditViewModel}"> |
| 19 | + <Window.Resources> |
| 20 | + <Style TargetType="TextBlock"> |
| 21 | + <Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"></Setter> |
| 22 | + <Setter Property="VerticalAlignment" Value="Center"></Setter> |
| 23 | + <Setter Property="HorizontalAlignment" Value="Right"></Setter> |
| 24 | + <Setter Property="TextAlignment" Value="Right"></Setter> |
| 25 | + <Setter Property="TextWrapping" Value="Wrap"></Setter> |
| 26 | + <Setter Property="Margin" Value="20 5 10 15"></Setter> |
| 27 | + </Style> |
| 28 | + <Style TargetType="TextBox" BasedOn="{StaticResource TextBoxAccentStyle}"> |
| 29 | + <Setter Property="Margin" Value="0 5 0 15"></Setter> |
| 30 | + </Style> |
| 31 | + <Style TargetType="PasswordBox" BasedOn="{StaticResource PasswordBoxAccentStyle}"> |
| 32 | + <Setter Property="Margin" Value="0 5 0 15"></Setter> |
| 33 | + </Style> |
| 34 | + </Window.Resources> |
19 | 35 |
|
20 | 36 | <Border Background="{DynamicResource PrimaryMidBrush}" |
21 | 37 | BorderBrush="{DynamicResource PrimaryLightBrush}" |
22 | | - BorderThickness="1" CornerRadius="{StaticResource DefaultCornerRadius}" ClipToBounds="True"> |
| 38 | + BorderThickness="1" |
| 39 | + CornerRadius="{StaticResource DefaultCornerRadius}" |
| 40 | + ClipToBounds="True"> |
23 | 41 | <Grid IsSharedSizeScope="True"> |
24 | | - <Grid> |
25 | 42 |
|
26 | | - <StackPanel Margin="0 0 20 0"> |
27 | | - <TextBlock Style="{StaticResource EditorGroupTextBlockTitle}" Text="{DynamicResource Connection}"></TextBlock> |
28 | | - |
29 | | - <Grid Style="{StaticResource EditorRowGrid}"> |
30 | | - <StackPanel Orientation="Horizontal"> |
31 | | - <TextBlock Style="{StaticResource EditorRowGridTitle}" Text="{DynamicResource Name}"></TextBlock> |
32 | | - <Grid Style="{StaticResource EditorRowGridInput}"> |
33 | | - <TextBox Name="TbName" |
34 | | - Text="{Binding Name, |
35 | | - ValidatesOnExceptions=True, |
36 | | - UpdateSourceTrigger=PropertyChanged}"></TextBox> |
37 | | - <TextBlock FontSize="12" Margin="0" Foreground="Red" Text="{Binding (Validation.Errors)/ErrorContent, ElementName=TbName}" HorizontalAlignment="Left" VerticalAlignment="Bottom"/> |
38 | | - </Grid> |
39 | | - </StackPanel> |
40 | | - </Grid> |
| 43 | + <StackPanel Margin="20 0"> |
| 44 | + <TextBlock Text="{DynamicResource Connection}" Margin="15" FontSize="20" Height="30" HorizontalAlignment="Left"></TextBlock> |
41 | 45 |
|
| 46 | + <Grid> |
| 47 | + <Grid.RowDefinitions> |
| 48 | + <RowDefinition></RowDefinition> |
| 49 | + <RowDefinition></RowDefinition> |
| 50 | + <RowDefinition></RowDefinition> |
| 51 | + <RowDefinition></RowDefinition> |
| 52 | + <RowDefinition></RowDefinition> |
| 53 | + <RowDefinition></RowDefinition> |
| 54 | + <RowDefinition></RowDefinition> |
| 55 | + <RowDefinition></RowDefinition> |
| 56 | + <RowDefinition></RowDefinition> |
| 57 | + </Grid.RowDefinitions> |
| 58 | + <Grid.ColumnDefinitions> |
| 59 | + <ColumnDefinition Width="Auto"></ColumnDefinition> |
| 60 | + <ColumnDefinition Width="280"></ColumnDefinition> |
| 61 | + <ColumnDefinition Width="Auto"></ColumnDefinition> |
| 62 | + </Grid.ColumnDefinitions> |
42 | 63 |
|
43 | | - <Grid Style="{StaticResource EditorRowGrid}"> |
44 | | - <StackPanel Orientation="Horizontal"> |
45 | | - <TextBlock Style="{StaticResource EditorRowGridTitle}" Text="{DynamicResource Hostname}"></TextBlock> |
46 | | - <Grid Style="{StaticResource EditorRowGridInput}"> |
47 | | - <TextBox Text="{Binding New.Address, UpdateSourceTrigger=PropertyChanged}" |
48 | | - Tag="TXT: leave empty to inherited the default value" |
49 | | - ></TextBox> |
50 | | - </Grid> |
51 | | - <TextBlock Style="{StaticResource EditorRowGridTitle}" Width="60" Text="{DynamicResource Port}"></TextBlock> |
52 | | - <Grid Style="{StaticResource EditorRowGridInput}" Width="Auto"> |
53 | | - <TextBox Text="{Binding Port, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, NotifyOnValidationError=True}" |
54 | | - MinWidth="50" HorizontalAlignment="Left" |
55 | | - InputMethod.IsInputMethodEnabled="False" |
56 | | - InputScope="Number"></TextBox> |
57 | | - </Grid> |
58 | | - </StackPanel> |
| 64 | + <TextBlock Grid.Row="0" Grid.Column="0" Text="{DynamicResource Name}"></TextBlock> |
| 65 | + <Grid Grid.Row="0" Grid.Column="1"> |
| 66 | + <TextBox Name="TbName" Text="{Binding Name, UpdateSourceTrigger=PropertyChanged}"/> |
| 67 | + <TextBlock FontSize="12" Margin="0" Foreground="Red" Text="{Binding (Validation.Errors)/ErrorContent, ElementName=TbName}" HorizontalAlignment="Left" VerticalAlignment="Bottom"/> |
59 | 68 | </Grid> |
60 | 69 |
|
| 70 | + <TextBlock Grid.Row="1" Grid.Column="0" Text="{DynamicResource Hostname}"></TextBlock> |
| 71 | + <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding New.Address, UpdateSourceTrigger=PropertyChanged}" |
| 72 | + Tag="TXT: leave empty to inherited the default value..................................................."/> |
61 | 73 |
|
62 | 74 |
|
| 75 | + <TextBlock Grid.Row="2" Grid.Column="0" Text="{DynamicResource Port}"></TextBlock> |
| 76 | + <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Port, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, NotifyOnValidationError=True}" |
| 77 | + InputMethod.IsInputMethodEnabled="False" InputScope="Number" |
| 78 | + Tag="TXT: leave empty to inherited the default value"></TextBox> |
63 | 79 |
|
64 | | - <Grid Style="{StaticResource EditorRowGrid}"> |
65 | | - <StackPanel Orientation="Horizontal"> |
66 | | - <TextBlock Style="{StaticResource EditorRowGridTitle}" Text="{DynamicResource User}"></TextBlock> |
67 | | - <Grid Style="{StaticResource EditorRowGridInput}"> |
68 | | - <TextBox Text="{Binding New.UserName, UpdateSourceTrigger=PropertyChanged}"></TextBox> |
69 | | - </Grid> |
70 | | - </StackPanel> |
71 | | - </Grid> |
72 | | - |
73 | | - |
74 | | - |
75 | | - <Grid Style="{StaticResource EditorRowGrid}"> |
76 | | - <StackPanel Orientation="Horizontal"> |
77 | | - <TextBlock Style="{StaticResource EditorRowGridTitle}" Text="{DynamicResource Password}"></TextBlock> |
78 | | - <Grid Style="{StaticResource EditorRowGridInput}"> |
79 | | - <PasswordBox attachProperty:PasswordBoxAttachProperty.Password="{Binding New.Password, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/> |
80 | | - </Grid> |
81 | | - </StackPanel> |
82 | | - </Grid> |
| 80 | + <TextBlock Grid.Row="6" Grid.Column="0" Text="{DynamicResource User}"></TextBlock> |
| 81 | + <TextBox Grid.Row="6" Grid.Column="1" Text="{Binding New.UserName, UpdateSourceTrigger=PropertyChanged}" |
| 82 | + Tag="TXT: leave empty to inherited the default value"/> |
83 | 83 |
|
| 84 | + <TextBlock Grid.Row="7" Grid.Column="0" Text="{DynamicResource Password}"></TextBlock> |
| 85 | + <PasswordBox Grid.Row="7" Grid.Column="1" |
| 86 | + Tag="TXT: leave empty to inherited the default value................." |
| 87 | + attachProperty:PasswordBoxAttachProperty.Password="{Binding New.Password, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/> |
| 88 | + </Grid> |
84 | 89 |
|
85 | 90 |
|
86 | | - <StackPanel Margin="0 0 0 20" Orientation="Horizontal" HorizontalAlignment="Center"> |
87 | | - <Button Command="{Binding CmdSave}" Content="{DynamicResource Save}" Width="100" Margin="10 0"></Button> |
88 | | - <Button Command="{Binding CmdCancel}" Content="{DynamicResource Cancel}" Width="100" Margin="10 0"></Button> |
89 | | - </StackPanel> |
| 91 | + <StackPanel Margin="0 0 0 20" Orientation="Horizontal" HorizontalAlignment="Center"> |
| 92 | + <Button Command="{Binding CmdSave}" Content="{DynamicResource Save}" Width="100" Margin="10 0"></Button> |
| 93 | + <Button Command="{Binding CmdCancel}" Content="{DynamicResource Cancel}" Width="100" Margin="10 0"></Button> |
90 | 94 | </StackPanel> |
91 | | - </Grid> |
| 95 | + </StackPanel> |
92 | 96 | </Grid> |
93 | 97 | </Border> |
94 | 98 | </styles:WindowChromeBase> |
0 commit comments