Skip to content

Commit f930da4

Browse files
committed
chore: Fix HorizontalAlignment=center for UniformSpacingPanel by wrapping a grid arround
1 parent 9db7d61 commit f930da4

File tree

1 file changed

+48
-42
lines changed

1 file changed

+48
-42
lines changed

sample/Atc.Wpf.Sample/SamplesWpfControls/DialogBoxes/StandardDialogBoxView.xaml

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -39,48 +39,54 @@
3939
<Button Command="{Binding Path=ShowInfoErrorDialogBoxCommand}" Content="Error" />
4040
<Button Command="{Binding Path=ShowQuestionDialogBoxCommand}" Content="Question" />
4141
<Button Command="{Binding Path=ShowInputDialogBoxCommand}" Content="Input" />
42-
<atc:UniformSpacingPanel
43-
HorizontalAlignment="Center"
44-
Orientation="Horizontal"
45-
Spacing="5">
46-
<Button
47-
Command="{Binding Path=ShowInputForm1ColumnXFieldVerticalDialogBoxCommand}"
48-
CommandParameter="1"
49-
Content="IF.V. 1col, 1field" />
50-
<Button
51-
Command="{Binding Path=ShowInputForm1ColumnXFieldVerticalDialogBoxCommand}"
52-
CommandParameter="2"
53-
Content="IF.V. 1col, 2field" />
54-
<Button
55-
Command="{Binding Path=ShowInputForm1ColumnXFieldVerticalDialogBoxCommand}"
56-
CommandParameter="3"
57-
Content="IF.V. 1col, 3field" />
58-
<Button
59-
Command="{Binding Path=ShowInputForm1ColumnXFieldVerticalDialogBoxCommand}"
60-
CommandParameter="4"
61-
Content="IF.V. 1col, 4field" />
62-
</atc:UniformSpacingPanel>
63-
<atc:UniformSpacingPanel
64-
HorizontalAlignment="Center"
65-
Orientation="Horizontal"
66-
Spacing="5">
67-
<Button
68-
Command="{Binding Path=ShowInputForm1ColumnXFieldHorizontalDialogBoxCommand}"
69-
CommandParameter="1"
70-
Content="IF.H. 1col, 1field" />
71-
<Button
72-
Command="{Binding Path=ShowInputForm1ColumnXFieldHorizontalDialogBoxCommand}"
73-
CommandParameter="2"
74-
Content="IF.H. 1col, 2field" />
75-
<Button
76-
Command="{Binding Path=ShowInputForm1ColumnXFieldHorizontalDialogBoxCommand}"
77-
CommandParameter="3"
78-
Content="IF.H. 1col, 3field" />
79-
<Button
80-
Command="{Binding Path=ShowInputForm1ColumnXFieldHorizontalDialogBoxCommand}"
81-
CommandParameter="4"
82-
Content="IF.H. 1col, 4field" />
83-
</atc:UniformSpacingPanel>
42+
<Grid>
43+
<atc:UniformSpacingPanel
44+
HorizontalAlignment="Center"
45+
ItemWidth="100"
46+
Orientation="Horizontal"
47+
Spacing="10">
48+
<Button
49+
Command="{Binding Path=ShowInputForm1ColumnXFieldVerticalDialogBoxCommand}"
50+
CommandParameter="1"
51+
Content="IF.V. 1col, 1field" />
52+
<Button
53+
Command="{Binding Path=ShowInputForm1ColumnXFieldVerticalDialogBoxCommand}"
54+
CommandParameter="2"
55+
Content="IF.V. 1col, 2field" />
56+
<Button
57+
Command="{Binding Path=ShowInputForm1ColumnXFieldVerticalDialogBoxCommand}"
58+
CommandParameter="3"
59+
Content="IF.V. 1col, 3field" />
60+
<Button
61+
Command="{Binding Path=ShowInputForm1ColumnXFieldVerticalDialogBoxCommand}"
62+
CommandParameter="4"
63+
Content="IF.V. 1col, 4field" />
64+
</atc:UniformSpacingPanel>
65+
</Grid>
66+
<Grid>
67+
<atc:UniformSpacingPanel
68+
HorizontalAlignment="Center"
69+
ItemWidth="100"
70+
Orientation="Horizontal"
71+
Spacing="10">
72+
<Button
73+
Command="{Binding Path=ShowInputForm1ColumnXFieldHorizontalDialogBoxCommand}"
74+
CommandParameter="1"
75+
Content="IF.H. 1col, 1field" />
76+
<Button
77+
Command="{Binding Path=ShowInputForm1ColumnXFieldHorizontalDialogBoxCommand}"
78+
CommandParameter="2"
79+
Content="IF.H. 1col, 2field" />
80+
<Button
81+
Command="{Binding Path=ShowInputForm1ColumnXFieldHorizontalDialogBoxCommand}"
82+
CommandParameter="3"
83+
Content="IF.H. 1col, 3field" />
84+
<Button
85+
Command="{Binding Path=ShowInputForm1ColumnXFieldHorizontalDialogBoxCommand}"
86+
CommandParameter="4"
87+
Content="IF.H. 1col, 4field" />
88+
</atc:UniformSpacingPanel>
89+
</Grid>
8490
<Button Command="{Binding Path=ShowInputForm1ColumnDialogBoxCommand}" Content="Input Form 1 columns" />
8591
<Button Command="{Binding Path=ShowInputForm2ColumnsDialogBoxCommand}" Content="Input Form 2 columns" />
8692
<Button Command="{Binding Path=ShowInputForm3ColumnsDialogBoxCommand}" Content="Input Form 3 columns" />

0 commit comments

Comments
 (0)