回答編集履歴
1
見直しキャンペーン中
test
CHANGED
@@ -1,285 +1,143 @@
|
|
1
1
|
> gridが拡大したときにほかのコントロールのかぶってしまいます。
|
2
2
|
|
3
|
-
|
4
|
-
|
5
3
|
ハンバーガーメニューにもオーバーレイするものと、押し出すもの両方ありますよね。
|
6
|
-
|
7
4
|
かぶらないようにするなら`Grid`で区切って、メニュー部分とコンテンツ部分を別々に入れればいいんじゃないですかね。
|
8
|
-
|
9
|
-
|
10
5
|
|
11
6
|
> ボタン二つで制御しているので、1つにまとめることができないか知りたいです。
|
12
7
|
|
13
|
-
|
14
|
-
|
15
8
|
オンオフを表すようなものには、`ToggleButton`があります。
|
16
|
-
|
17
|
-
|
18
9
|
|
19
10
|
> ほか方法がありましたら
|
20
11
|
|
21
|
-
|
22
|
-
|
23
12
|
ハンバーガーメニューはNuGetやGitHub・ブログ記事等いくつかあると思うので、研究してみるといいかもしれませんね。
|
24
13
|
|
14
|
+
個人的には`NavigationView`が、WinUIで自然に使えたら言うことないのですが。
|
25
15
|
|
26
|
-
|
27
|
-
個人的には`NavigationView `が、WinUIで自然に使えたら言うことないのですが。
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
```x
|
16
|
+
```xml
|
32
|
-
|
33
17
|
<Window
|
34
|
-
|
35
18
|
x:Class="Questions290156.MainWindow"
|
36
|
-
|
37
19
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
38
|
-
|
39
20
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
40
|
-
|
41
21
|
Width="800"
|
42
|
-
|
43
22
|
Height="450">
|
44
|
-
|
45
23
|
<Window.Resources>
|
46
|
-
|
47
24
|
<Storyboard x:Key="Appearance">
|
48
|
-
|
49
25
|
<DoubleAnimation
|
50
|
-
|
51
26
|
Storyboard.TargetName="config"
|
52
|
-
|
53
27
|
Storyboard.TargetProperty="Width"
|
54
|
-
|
55
28
|
To="300"
|
56
|
-
|
57
29
|
Duration="00:00:00.1" />
|
58
|
-
|
30
|
+
</Storyboard>
|
31
|
+
<Storyboard x:Key="Disappear">
|
32
|
+
<DoubleAnimation
|
33
|
+
Storyboard.TargetName="config"
|
34
|
+
Storyboard.TargetProperty="Width"
|
35
|
+
To="20"
|
36
|
+
Duration="00:00:00.1" />
|
59
37
|
</Storyboard>
|
60
38
|
|
61
|
-
<Storyboard x:Key="Disappear">
|
62
|
-
|
63
|
-
<DoubleAnimation
|
64
|
-
|
65
|
-
Storyboard.TargetName="config"
|
66
|
-
|
67
|
-
Storyboard.TargetProperty="Width"
|
68
|
-
|
69
|
-
To="20"
|
70
|
-
|
71
|
-
Duration="00:00:00.1" />
|
72
|
-
|
73
|
-
</Storyboard>
|
74
|
-
|
75
|
-
|
76
|
-
|
77
39
|
<Style TargetType="HeaderedContentControl">
|
78
|
-
|
79
40
|
<Setter Property="Margin" Value="30,20" />
|
80
|
-
|
81
41
|
<Setter Property="Header" Value="Label" />
|
82
|
-
|
83
42
|
</Style>
|
84
|
-
|
85
43
|
</Window.Resources>
|
86
|
-
|
87
44
|
<Grid>
|
88
|
-
|
89
45
|
<Grid.ColumnDefinitions>
|
90
|
-
|
91
46
|
<ColumnDefinition />
|
92
|
-
|
93
47
|
<ColumnDefinition Width="Auto" />
|
94
|
-
|
95
48
|
</Grid.ColumnDefinitions>
|
96
|
-
|
97
49
|
<Button
|
98
|
-
|
99
50
|
x:Name="Btn001"
|
100
|
-
|
101
51
|
Width="67"
|
102
|
-
|
103
52
|
Height="40"
|
104
|
-
|
105
53
|
Margin="0,177,242,0"
|
106
|
-
|
107
54
|
HorizontalAlignment="Right"
|
108
|
-
|
109
55
|
VerticalAlignment="Top"
|
110
|
-
|
111
56
|
Content="設定">
|
112
|
-
|
113
57
|
<Button.Triggers>
|
114
|
-
|
115
58
|
<EventTrigger RoutedEvent="Button.Click">
|
116
|
-
|
117
59
|
<BeginStoryboard Storyboard="{StaticResource Appearance}" />
|
118
|
-
|
119
60
|
</EventTrigger>
|
120
|
-
|
121
61
|
</Button.Triggers>
|
122
|
-
|
62
|
+
</Button>
|
63
|
+
<Button
|
64
|
+
x:Name="Btn001_Copy"
|
65
|
+
Width="67"
|
66
|
+
Height="40"
|
67
|
+
Margin="0,90,176,0"
|
68
|
+
HorizontalAlignment="Right"
|
69
|
+
VerticalAlignment="Top"
|
70
|
+
Content="設定">
|
71
|
+
<Button.Triggers>
|
72
|
+
<EventTrigger RoutedEvent="Button.Click">
|
73
|
+
<BeginStoryboard Storyboard="{StaticResource Disappear}" />
|
74
|
+
</EventTrigger>
|
75
|
+
</Button.Triggers>
|
123
76
|
</Button>
|
124
77
|
|
125
|
-
<Button
|
126
|
-
|
127
|
-
x:Name="Btn001_Copy"
|
128
|
-
|
129
|
-
Width="67"
|
130
|
-
|
131
|
-
Height="40"
|
132
|
-
|
133
|
-
Margin="0,90,176,0"
|
134
|
-
|
135
|
-
HorizontalAlignment="Right"
|
136
|
-
|
137
|
-
VerticalAlignment="Top"
|
138
|
-
|
139
|
-
Content="設定">
|
140
|
-
|
141
|
-
<Button.Triggers>
|
142
|
-
|
143
|
-
<EventTrigger RoutedEvent="Button.Click">
|
144
|
-
|
145
|
-
<BeginStoryboard Storyboard="{StaticResource Disappear}" />
|
146
|
-
|
147
|
-
</EventTrigger>
|
148
|
-
|
149
|
-
</Button.Triggers>
|
150
|
-
|
151
|
-
</Button>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
78
|
<Grid
|
156
|
-
|
157
79
|
x:Name="config"
|
158
|
-
|
159
80
|
Grid.Column="1"
|
160
|
-
|
161
81
|
Width="300"
|
162
|
-
|
163
82
|
Background="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}">
|
164
|
-
|
165
83
|
<Grid.RowDefinitions>
|
166
|
-
|
167
84
|
<RowDefinition Height="Auto" />
|
168
|
-
|
169
85
|
<RowDefinition Height="Auto" />
|
170
|
-
|
171
86
|
<RowDefinition Height="Auto" />
|
172
|
-
|
173
87
|
<RowDefinition />
|
174
|
-
|
175
88
|
</Grid.RowDefinitions>
|
176
|
-
|
177
89
|
<Grid.ColumnDefinitions>
|
178
|
-
|
179
90
|
<ColumnDefinition />
|
180
|
-
|
181
91
|
<ColumnDefinition />
|
182
|
-
|
183
92
|
</Grid.ColumnDefinitions>
|
184
93
|
|
185
|
-
|
186
|
-
|
187
94
|
<HeaderedContentControl>
|
188
|
-
|
189
95
|
<ComboBox />
|
190
|
-
|
191
96
|
</HeaderedContentControl>
|
192
|
-
|
193
97
|
<HeaderedContentControl Grid.Column="1">
|
194
|
-
|
195
98
|
<ComboBox />
|
196
|
-
|
197
99
|
</HeaderedContentControl>
|
198
|
-
|
199
100
|
<HeaderedContentControl Grid.Row="1">
|
200
|
-
|
201
101
|
<ComboBox />
|
202
|
-
|
203
102
|
</HeaderedContentControl>
|
204
|
-
|
205
103
|
<HeaderedContentControl Grid.Row="1" Grid.Column="1">
|
206
|
-
|
207
104
|
<ComboBox />
|
208
|
-
|
209
105
|
</HeaderedContentControl>
|
210
|
-
|
211
106
|
<HeaderedContentControl Grid.Row="2">
|
212
|
-
|
213
107
|
<ComboBox />
|
214
|
-
|
215
108
|
</HeaderedContentControl>
|
216
|
-
|
217
109
|
<HeaderedContentControl Grid.Row="2" Grid.Column="1">
|
218
|
-
|
219
110
|
<ComboBox />
|
220
|
-
|
221
111
|
</HeaderedContentControl>
|
222
|
-
|
223
112
|
</Grid>
|
224
113
|
|
225
|
-
|
226
|
-
|
227
114
|
<ToggleButton
|
228
|
-
|
229
115
|
HorizontalAlignment="Left"
|
230
|
-
|
231
116
|
VerticalAlignment="Top"
|
232
|
-
|
233
117
|
Content=">" Grid.Column="1">
|
234
|
-
|
235
118
|
<ToggleButton.Triggers>
|
236
|
-
|
237
119
|
<EventTrigger RoutedEvent="ToggleButton.Checked">
|
238
|
-
|
239
120
|
<BeginStoryboard Storyboard="{StaticResource Disappear}" />
|
240
|
-
|
241
121
|
<BeginStoryboard>
|
242
|
-
|
243
122
|
<Storyboard>
|
244
|
-
|
245
123
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Content">
|
246
|
-
|
247
124
|
<DiscreteObjectKeyFrame KeyTime="0" Value="<" />
|
248
|
-
|
249
125
|
</ObjectAnimationUsingKeyFrames>
|
250
|
-
|
251
126
|
</Storyboard>
|
252
|
-
|
253
127
|
</BeginStoryboard>
|
254
|
-
|
255
128
|
</EventTrigger>
|
256
|
-
|
257
129
|
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
|
258
|
-
|
259
130
|
<BeginStoryboard Storyboard="{StaticResource Appearance}" />
|
260
|
-
|
261
131
|
<BeginStoryboard>
|
262
|
-
|
263
132
|
<Storyboard>
|
264
|
-
|
265
133
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Content">
|
266
|
-
|
267
134
|
<DiscreteObjectKeyFrame KeyTime="0" Value=">" />
|
268
|
-
|
269
135
|
</ObjectAnimationUsingKeyFrames>
|
270
|
-
|
271
136
|
</Storyboard>
|
272
|
-
|
273
137
|
</BeginStoryboard>
|
274
|
-
|
275
138
|
</EventTrigger>
|
276
|
-
|
277
139
|
</ToggleButton.Triggers>
|
278
|
-
|
279
140
|
</ToggleButton>
|
280
|
-
|
281
141
|
</Grid>
|
282
|
-
|
283
142
|
</Window>
|
284
|
-
|
285
143
|
```
|