回答編集履歴
1
見直しキャンペーン中
test
CHANGED
@@ -1,357 +1,179 @@
|
|
1
1
|
14行目`<TextBlock Foreground="SkyBlue"`のところです。
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
```x
|
3
|
+
```xml
|
6
|
-
|
7
4
|
<Window
|
8
|
-
|
9
5
|
x:Class="Questions304819.MainWindow"
|
10
|
-
|
11
6
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
12
|
-
|
13
7
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
14
|
-
|
15
8
|
SizeToContent="WidthAndHeight">
|
16
|
-
|
17
9
|
<Window.Resources>
|
18
|
-
|
19
10
|
<Style x:Key="CalendarItemStyle1" TargetType="{x:Type CalendarItem}">
|
20
|
-
|
21
11
|
<Setter Property="Margin" Value="0,3,0,3"/>
|
22
|
-
|
23
12
|
<Setter Property="Template">
|
24
|
-
|
25
13
|
<Setter.Value>
|
26
|
-
|
27
14
|
<ControlTemplate TargetType="{x:Type CalendarItem}">
|
28
|
-
|
29
15
|
<ControlTemplate.Resources>
|
30
|
-
|
31
16
|
<DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
|
32
|
-
|
33
17
|
<TextBlock Foreground="SkyBlue" FontWeight="Bold" FontSize="9.5" FontFamily="Verdana" HorizontalAlignment="Center" Margin="0,6,0,6" Text="{Binding}" VerticalAlignment="Center"/>
|
34
|
-
|
35
18
|
<!-- ↑ここ-->
|
36
|
-
|
37
19
|
</DataTemplate>
|
38
|
-
|
39
20
|
</ControlTemplate.Resources>
|
40
|
-
|
41
21
|
<Grid x:Name="PART_Root">
|
42
|
-
|
43
22
|
<Grid.Resources>
|
44
|
-
|
45
23
|
<SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF"/>
|
46
|
-
|
47
24
|
</Grid.Resources>
|
48
|
-
|
49
25
|
<VisualStateManager.VisualStateGroups>
|
50
|
-
|
51
26
|
<VisualStateGroup x:Name="CommonStates">
|
52
|
-
|
53
27
|
<VisualState x:Name="Normal"/>
|
54
|
-
|
55
28
|
<VisualState x:Name="Disabled">
|
56
|
-
|
57
29
|
<Storyboard>
|
58
|
-
|
59
30
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_DisabledVisual"/>
|
60
|
-
|
61
31
|
</Storyboard>
|
62
|
-
|
63
32
|
</VisualState>
|
64
|
-
|
65
33
|
</VisualStateGroup>
|
66
|
-
|
67
34
|
</VisualStateManager.VisualStateGroups>
|
68
|
-
|
69
35
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1">
|
70
|
-
|
71
36
|
<Border BorderBrush="#FFFFFFFF" BorderThickness="2" CornerRadius="1">
|
72
|
-
|
73
37
|
<Grid>
|
74
|
-
|
75
38
|
<Grid.Resources>
|
76
|
-
|
77
39
|
<ControlTemplate x:Key="PreviousButtonTemplate" TargetType="{x:Type Button}">
|
78
|
-
|
79
40
|
<Grid Cursor="Hand">
|
80
|
-
|
81
41
|
<VisualStateManager.VisualStateGroups>
|
82
|
-
|
83
42
|
<VisualStateGroup x:Name="CommonStates">
|
84
|
-
|
85
43
|
<VisualState x:Name="Normal"/>
|
86
|
-
|
87
44
|
<VisualState x:Name="MouseOver">
|
88
|
-
|
89
45
|
<Storyboard>
|
90
|
-
|
91
46
|
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path"/>
|
92
|
-
|
93
47
|
</Storyboard>
|
94
|
-
|
95
48
|
</VisualState>
|
96
|
-
|
97
49
|
<VisualState x:Name="Disabled">
|
98
|
-
|
99
50
|
<Storyboard>
|
100
|
-
|
101
51
|
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" Storyboard.TargetName="path"/>
|
102
|
-
|
103
52
|
</Storyboard>
|
104
|
-
|
105
53
|
</VisualState>
|
106
|
-
|
107
54
|
</VisualStateGroup>
|
108
|
-
|
109
55
|
</VisualStateManager.VisualStateGroups>
|
110
|
-
|
111
56
|
<Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
|
112
|
-
|
113
57
|
<Grid>
|
114
|
-
|
115
58
|
<Path x:Name="path" Data="M288.75,232.25 L288.75,240.625 L283,236.625 z" Fill="#FF333333" HorizontalAlignment="Left" Height="10" Margin="14,-6,0,0" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
|
116
|
-
|
117
59
|
</Grid>
|
118
|
-
|
119
60
|
</Grid>
|
120
|
-
|
121
61
|
</ControlTemplate>
|
122
|
-
|
123
62
|
<ControlTemplate x:Key="NextButtonTemplate" TargetType="{x:Type Button}">
|
124
|
-
|
125
63
|
<Grid Cursor="Hand">
|
126
|
-
|
127
64
|
<VisualStateManager.VisualStateGroups>
|
128
|
-
|
129
65
|
<VisualStateGroup x:Name="CommonStates">
|
130
|
-
|
131
66
|
<VisualState x:Name="Normal"/>
|
132
|
-
|
133
67
|
<VisualState x:Name="MouseOver">
|
134
|
-
|
135
68
|
<Storyboard>
|
136
|
-
|
137
69
|
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path"/>
|
138
|
-
|
139
70
|
</Storyboard>
|
140
|
-
|
141
71
|
</VisualState>
|
142
|
-
|
143
72
|
<VisualState x:Name="Disabled">
|
144
|
-
|
145
73
|
<Storyboard>
|
146
|
-
|
147
74
|
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" Storyboard.TargetName="path"/>
|
148
|
-
|
149
75
|
</Storyboard>
|
150
|
-
|
151
76
|
</VisualState>
|
152
|
-
|
153
77
|
</VisualStateGroup>
|
154
|
-
|
155
78
|
</VisualStateManager.VisualStateGroups>
|
156
|
-
|
157
79
|
<Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
|
158
|
-
|
159
80
|
<Grid>
|
160
|
-
|
161
81
|
<Path x:Name="path" Data="M282.875,231.875 L282.875,240.375 L288.625,236 z" Fill="#FF333333" HorizontalAlignment="Right" Height="10" Margin="0,-6,14,0" Stretch="Fill" VerticalAlignment="Center" Width="6"/>
|
162
|
-
|
163
82
|
</Grid>
|
164
|
-
|
165
83
|
</Grid>
|
166
|
-
|
167
84
|
</ControlTemplate>
|
168
|
-
|
169
85
|
<ControlTemplate x:Key="HeaderButtonTemplate" TargetType="{x:Type Button}">
|
170
|
-
|
171
86
|
<Grid Cursor="Hand">
|
172
|
-
|
173
87
|
<VisualStateManager.VisualStateGroups>
|
174
|
-
|
175
88
|
<VisualStateGroup x:Name="CommonStates">
|
176
|
-
|
177
89
|
<VisualState x:Name="Normal"/>
|
178
|
-
|
179
90
|
<VisualState x:Name="MouseOver">
|
180
|
-
|
181
91
|
<Storyboard>
|
182
|
-
|
183
92
|
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="buttonContent"/>
|
184
|
-
|
185
93
|
</Storyboard>
|
186
|
-
|
187
94
|
</VisualState>
|
188
|
-
|
189
95
|
<VisualState x:Name="Disabled">
|
190
|
-
|
191
96
|
<Storyboard>
|
192
|
-
|
193
97
|
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="buttonContent"/>
|
194
|
-
|
195
98
|
</Storyboard>
|
196
|
-
|
197
99
|
</VisualState>
|
198
|
-
|
199
100
|
</VisualStateGroup>
|
200
|
-
|
201
101
|
</VisualStateManager.VisualStateGroups>
|
202
|
-
|
203
102
|
<ContentPresenter x:Name="buttonContent" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" TextElement.Foreground="#FF333333" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1,4,1,9" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
204
|
-
|
205
103
|
</Grid>
|
206
|
-
|
207
104
|
</ControlTemplate>
|
208
|
-
|
209
105
|
</Grid.Resources>
|
210
|
-
|
211
106
|
<Grid.ColumnDefinitions>
|
212
|
-
|
213
107
|
<ColumnDefinition Width="Auto"/>
|
214
|
-
|
215
108
|
<ColumnDefinition Width="Auto"/>
|
216
|
-
|
217
109
|
<ColumnDefinition Width="Auto"/>
|
218
|
-
|
219
110
|
</Grid.ColumnDefinitions>
|
220
|
-
|
221
111
|
<Grid.RowDefinitions>
|
222
|
-
|
223
112
|
<RowDefinition Height="Auto"/>
|
224
|
-
|
225
113
|
<RowDefinition Height="*"/>
|
226
|
-
|
227
114
|
</Grid.RowDefinitions>
|
228
|
-
|
229
115
|
<Button x:Name="PART_PreviousButton" Grid.Column="0" Focusable="False" HorizontalAlignment="Left" Height="20" Grid.Row="0" Template="{StaticResource PreviousButtonTemplate}" Width="28"/>
|
230
|
-
|
231
116
|
<Button x:Name="PART_HeaderButton" Grid.Column="1" FontWeight="Bold" Focusable="False" FontSize="10.5" HorizontalAlignment="Center" Grid.Row="0" Template="{StaticResource HeaderButtonTemplate}" VerticalAlignment="Center"/>
|
232
|
-
|
233
117
|
<Button x:Name="PART_NextButton" Grid.Column="2" Focusable="False" HorizontalAlignment="Right" Height="20" Grid.Row="0" Template="{StaticResource NextButtonTemplate}" Width="28"/>
|
234
|
-
|
235
118
|
<Grid x:Name="PART_MonthView" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="6,-1,6,6" Grid.Row="1" Visibility="Visible">
|
236
|
-
|
237
119
|
<Grid.ColumnDefinitions>
|
238
|
-
|
239
120
|
<ColumnDefinition Width="Auto"/>
|
240
|
-
|
241
121
|
<ColumnDefinition Width="Auto"/>
|
242
|
-
|
243
122
|
<ColumnDefinition Width="Auto"/>
|
244
|
-
|
245
123
|
<ColumnDefinition Width="Auto"/>
|
246
|
-
|
247
124
|
<ColumnDefinition Width="Auto"/>
|
248
|
-
|
249
125
|
<ColumnDefinition Width="Auto"/>
|
250
|
-
|
251
126
|
<ColumnDefinition Width="Auto"/>
|
252
|
-
|
253
127
|
</Grid.ColumnDefinitions>
|
254
|
-
|
255
128
|
<Grid.RowDefinitions>
|
256
|
-
|
257
129
|
<RowDefinition Height="Auto"/>
|
258
|
-
|
259
130
|
<RowDefinition Height="Auto"/>
|
260
|
-
|
261
131
|
<RowDefinition Height="Auto"/>
|
262
|
-
|
263
132
|
<RowDefinition Height="Auto"/>
|
264
|
-
|
265
133
|
<RowDefinition Height="Auto"/>
|
266
|
-
|
267
134
|
<RowDefinition Height="Auto"/>
|
268
|
-
|
269
135
|
<RowDefinition Height="Auto"/>
|
270
|
-
|
271
136
|
</Grid.RowDefinitions>
|
272
|
-
|
273
137
|
</Grid>
|
274
|
-
|
275
138
|
<Grid x:Name="PART_YearView" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="6,-3,7,6" Grid.Row="1" Visibility="Hidden">
|
276
|
-
|
277
139
|
<Grid.ColumnDefinitions>
|
278
|
-
|
279
140
|
<ColumnDefinition Width="Auto"/>
|
280
|
-
|
281
141
|
<ColumnDefinition Width="Auto"/>
|
282
|
-
|
283
142
|
<ColumnDefinition Width="Auto"/>
|
284
|
-
|
285
143
|
<ColumnDefinition Width="Auto"/>
|
286
|
-
|
287
144
|
</Grid.ColumnDefinitions>
|
288
|
-
|
289
145
|
<Grid.RowDefinitions>
|
290
|
-
|
291
146
|
<RowDefinition Height="Auto"/>
|
292
|
-
|
293
147
|
<RowDefinition Height="Auto"/>
|
294
|
-
|
295
148
|
<RowDefinition Height="Auto"/>
|
296
|
-
|
297
149
|
</Grid.RowDefinitions>
|
298
|
-
|
299
150
|
</Grid>
|
300
|
-
|
301
151
|
</Grid>
|
302
|
-
|
303
152
|
</Border>
|
304
|
-
|
305
153
|
</Border>
|
306
|
-
|
307
154
|
<Rectangle x:Name="PART_DisabledVisual" Fill="{StaticResource DisabledColor}" Opacity="0" RadiusY="2" RadiusX="2" Stretch="Fill" Stroke="{StaticResource DisabledColor}" StrokeThickness="1" Visibility="Collapsed"/>
|
308
|
-
|
309
155
|
</Grid>
|
310
|
-
|
311
156
|
<ControlTemplate.Triggers>
|
312
|
-
|
313
157
|
<Trigger Property="IsEnabled" Value="False">
|
314
|
-
|
315
158
|
<Setter Property="Visibility" TargetName="PART_DisabledVisual" Value="Visible"/>
|
316
|
-
|
317
159
|
</Trigger>
|
318
|
-
|
319
160
|
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year">
|
320
|
-
|
321
161
|
<Setter Property="Visibility" TargetName="PART_MonthView" Value="Hidden"/>
|
322
|
-
|
323
162
|
<Setter Property="Visibility" TargetName="PART_YearView" Value="Visible"/>
|
324
|
-
|
325
163
|
</DataTrigger>
|
326
|
-
|
327
164
|
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade">
|
328
|
-
|
329
165
|
<Setter Property="Visibility" TargetName="PART_MonthView" Value="Hidden"/>
|
330
|
-
|
331
166
|
<Setter Property="Visibility" TargetName="PART_YearView" Value="Visible"/>
|
332
|
-
|
333
167
|
</DataTrigger>
|
334
|
-
|
335
168
|
</ControlTemplate.Triggers>
|
336
|
-
|
337
169
|
</ControlTemplate>
|
338
|
-
|
339
170
|
</Setter.Value>
|
340
|
-
|
341
171
|
</Setter>
|
342
|
-
|
343
172
|
</Style>
|
344
|
-
|
345
173
|
</Window.Resources>
|
346
|
-
|
347
174
|
<StackPanel Orientation="Horizontal">
|
348
|
-
|
349
175
|
<Calendar x:Name="custom" CalendarItemStyle="{DynamicResource CalendarItemStyle1}" />
|
350
|
-
|
351
176
|
<Calendar x:Name="normal" />
|
352
|
-
|
353
177
|
</StackPanel>
|
354
|
-
|
355
178
|
</Window>
|
356
|
-
|
357
179
|
```
|