回答編集履歴
1
見直しキャンペーン中
answer
CHANGED
@@ -1,179 +1,179 @@
|
|
1
|
-
14行目`<TextBlock Foreground="SkyBlue"`のところです。
|
2
|
-
|
3
|
-
```
|
4
|
-
<Window
|
5
|
-
x:Class="Questions304819.MainWindow"
|
6
|
-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
7
|
-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
8
|
-
SizeToContent="WidthAndHeight">
|
9
|
-
<Window.Resources>
|
10
|
-
<Style x:Key="CalendarItemStyle1" TargetType="{x:Type CalendarItem}">
|
11
|
-
<Setter Property="Margin" Value="0,3,0,3"/>
|
12
|
-
<Setter Property="Template">
|
13
|
-
<Setter.Value>
|
14
|
-
<ControlTemplate TargetType="{x:Type CalendarItem}">
|
15
|
-
<ControlTemplate.Resources>
|
16
|
-
<DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
|
17
|
-
<TextBlock Foreground="SkyBlue" FontWeight="Bold" FontSize="9.5" FontFamily="Verdana" HorizontalAlignment="Center" Margin="0,6,0,6" Text="{Binding}" VerticalAlignment="Center"/>
|
18
|
-
<!-- ↑ここ-->
|
19
|
-
</DataTemplate>
|
20
|
-
</ControlTemplate.Resources>
|
21
|
-
<Grid x:Name="PART_Root">
|
22
|
-
<Grid.Resources>
|
23
|
-
<SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF"/>
|
24
|
-
</Grid.Resources>
|
25
|
-
<VisualStateManager.VisualStateGroups>
|
26
|
-
<VisualStateGroup x:Name="CommonStates">
|
27
|
-
<VisualState x:Name="Normal"/>
|
28
|
-
<VisualState x:Name="Disabled">
|
29
|
-
<Storyboard>
|
30
|
-
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_DisabledVisual"/>
|
31
|
-
</Storyboard>
|
32
|
-
</VisualState>
|
33
|
-
</VisualStateGroup>
|
34
|
-
</VisualStateManager.VisualStateGroups>
|
35
|
-
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1">
|
36
|
-
<Border BorderBrush="#FFFFFFFF" BorderThickness="2" CornerRadius="1">
|
37
|
-
<Grid>
|
38
|
-
<Grid.Resources>
|
39
|
-
<ControlTemplate x:Key="PreviousButtonTemplate" TargetType="{x:Type Button}">
|
40
|
-
<Grid Cursor="Hand">
|
41
|
-
<VisualStateManager.VisualStateGroups>
|
42
|
-
<VisualStateGroup x:Name="CommonStates">
|
43
|
-
<VisualState x:Name="Normal"/>
|
44
|
-
<VisualState x:Name="MouseOver">
|
45
|
-
<Storyboard>
|
46
|
-
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path"/>
|
47
|
-
</Storyboard>
|
48
|
-
</VisualState>
|
49
|
-
<VisualState x:Name="Disabled">
|
50
|
-
<Storyboard>
|
51
|
-
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" Storyboard.TargetName="path"/>
|
52
|
-
</Storyboard>
|
53
|
-
</VisualState>
|
54
|
-
</VisualStateGroup>
|
55
|
-
</VisualStateManager.VisualStateGroups>
|
56
|
-
<Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
|
57
|
-
<Grid>
|
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"/>
|
59
|
-
</Grid>
|
60
|
-
</Grid>
|
61
|
-
</ControlTemplate>
|
62
|
-
<ControlTemplate x:Key="NextButtonTemplate" TargetType="{x:Type Button}">
|
63
|
-
<Grid Cursor="Hand">
|
64
|
-
<VisualStateManager.VisualStateGroups>
|
65
|
-
<VisualStateGroup x:Name="CommonStates">
|
66
|
-
<VisualState x:Name="Normal"/>
|
67
|
-
<VisualState x:Name="MouseOver">
|
68
|
-
<Storyboard>
|
69
|
-
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path"/>
|
70
|
-
</Storyboard>
|
71
|
-
</VisualState>
|
72
|
-
<VisualState x:Name="Disabled">
|
73
|
-
<Storyboard>
|
74
|
-
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" Storyboard.TargetName="path"/>
|
75
|
-
</Storyboard>
|
76
|
-
</VisualState>
|
77
|
-
</VisualStateGroup>
|
78
|
-
</VisualStateManager.VisualStateGroups>
|
79
|
-
<Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
|
80
|
-
<Grid>
|
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"/>
|
82
|
-
</Grid>
|
83
|
-
</Grid>
|
84
|
-
</ControlTemplate>
|
85
|
-
<ControlTemplate x:Key="HeaderButtonTemplate" TargetType="{x:Type Button}">
|
86
|
-
<Grid Cursor="Hand">
|
87
|
-
<VisualStateManager.VisualStateGroups>
|
88
|
-
<VisualStateGroup x:Name="CommonStates">
|
89
|
-
<VisualState x:Name="Normal"/>
|
90
|
-
<VisualState x:Name="MouseOver">
|
91
|
-
<Storyboard>
|
92
|
-
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="buttonContent"/>
|
93
|
-
</Storyboard>
|
94
|
-
</VisualState>
|
95
|
-
<VisualState x:Name="Disabled">
|
96
|
-
<Storyboard>
|
97
|
-
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="buttonContent"/>
|
98
|
-
</Storyboard>
|
99
|
-
</VisualState>
|
100
|
-
</VisualStateGroup>
|
101
|
-
</VisualStateManager.VisualStateGroups>
|
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}"/>
|
103
|
-
</Grid>
|
104
|
-
</ControlTemplate>
|
105
|
-
</Grid.Resources>
|
106
|
-
<Grid.ColumnDefinitions>
|
107
|
-
<ColumnDefinition Width="Auto"/>
|
108
|
-
<ColumnDefinition Width="Auto"/>
|
109
|
-
<ColumnDefinition Width="Auto"/>
|
110
|
-
</Grid.ColumnDefinitions>
|
111
|
-
<Grid.RowDefinitions>
|
112
|
-
<RowDefinition Height="Auto"/>
|
113
|
-
<RowDefinition Height="*"/>
|
114
|
-
</Grid.RowDefinitions>
|
115
|
-
<Button x:Name="PART_PreviousButton" Grid.Column="0" Focusable="False" HorizontalAlignment="Left" Height="20" Grid.Row="0" Template="{StaticResource PreviousButtonTemplate}" Width="28"/>
|
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"/>
|
117
|
-
<Button x:Name="PART_NextButton" Grid.Column="2" Focusable="False" HorizontalAlignment="Right" Height="20" Grid.Row="0" Template="{StaticResource NextButtonTemplate}" Width="28"/>
|
118
|
-
<Grid x:Name="PART_MonthView" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="6,-1,6,6" Grid.Row="1" Visibility="Visible">
|
119
|
-
<Grid.ColumnDefinitions>
|
120
|
-
<ColumnDefinition Width="Auto"/>
|
121
|
-
<ColumnDefinition Width="Auto"/>
|
122
|
-
<ColumnDefinition Width="Auto"/>
|
123
|
-
<ColumnDefinition Width="Auto"/>
|
124
|
-
<ColumnDefinition Width="Auto"/>
|
125
|
-
<ColumnDefinition Width="Auto"/>
|
126
|
-
<ColumnDefinition Width="Auto"/>
|
127
|
-
</Grid.ColumnDefinitions>
|
128
|
-
<Grid.RowDefinitions>
|
129
|
-
<RowDefinition Height="Auto"/>
|
130
|
-
<RowDefinition Height="Auto"/>
|
131
|
-
<RowDefinition Height="Auto"/>
|
132
|
-
<RowDefinition Height="Auto"/>
|
133
|
-
<RowDefinition Height="Auto"/>
|
134
|
-
<RowDefinition Height="Auto"/>
|
135
|
-
<RowDefinition Height="Auto"/>
|
136
|
-
</Grid.RowDefinitions>
|
137
|
-
</Grid>
|
138
|
-
<Grid x:Name="PART_YearView" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="6,-3,7,6" Grid.Row="1" Visibility="Hidden">
|
139
|
-
<Grid.ColumnDefinitions>
|
140
|
-
<ColumnDefinition Width="Auto"/>
|
141
|
-
<ColumnDefinition Width="Auto"/>
|
142
|
-
<ColumnDefinition Width="Auto"/>
|
143
|
-
<ColumnDefinition Width="Auto"/>
|
144
|
-
</Grid.ColumnDefinitions>
|
145
|
-
<Grid.RowDefinitions>
|
146
|
-
<RowDefinition Height="Auto"/>
|
147
|
-
<RowDefinition Height="Auto"/>
|
148
|
-
<RowDefinition Height="Auto"/>
|
149
|
-
</Grid.RowDefinitions>
|
150
|
-
</Grid>
|
151
|
-
</Grid>
|
152
|
-
</Border>
|
153
|
-
</Border>
|
154
|
-
<Rectangle x:Name="PART_DisabledVisual" Fill="{StaticResource DisabledColor}" Opacity="0" RadiusY="2" RadiusX="2" Stretch="Fill" Stroke="{StaticResource DisabledColor}" StrokeThickness="1" Visibility="Collapsed"/>
|
155
|
-
</Grid>
|
156
|
-
<ControlTemplate.Triggers>
|
157
|
-
<Trigger Property="IsEnabled" Value="False">
|
158
|
-
<Setter Property="Visibility" TargetName="PART_DisabledVisual" Value="Visible"/>
|
159
|
-
</Trigger>
|
160
|
-
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year">
|
161
|
-
<Setter Property="Visibility" TargetName="PART_MonthView" Value="Hidden"/>
|
162
|
-
<Setter Property="Visibility" TargetName="PART_YearView" Value="Visible"/>
|
163
|
-
</DataTrigger>
|
164
|
-
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade">
|
165
|
-
<Setter Property="Visibility" TargetName="PART_MonthView" Value="Hidden"/>
|
166
|
-
<Setter Property="Visibility" TargetName="PART_YearView" Value="Visible"/>
|
167
|
-
</DataTrigger>
|
168
|
-
</ControlTemplate.Triggers>
|
169
|
-
</ControlTemplate>
|
170
|
-
</Setter.Value>
|
171
|
-
</Setter>
|
172
|
-
</Style>
|
173
|
-
</Window.Resources>
|
174
|
-
<StackPanel Orientation="Horizontal">
|
175
|
-
<Calendar x:Name="custom" CalendarItemStyle="{DynamicResource CalendarItemStyle1}" />
|
176
|
-
<Calendar x:Name="normal" />
|
177
|
-
</StackPanel>
|
178
|
-
</Window>
|
1
|
+
14行目`<TextBlock Foreground="SkyBlue"`のところです。
|
2
|
+
|
3
|
+
```xml
|
4
|
+
<Window
|
5
|
+
x:Class="Questions304819.MainWindow"
|
6
|
+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
7
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
8
|
+
SizeToContent="WidthAndHeight">
|
9
|
+
<Window.Resources>
|
10
|
+
<Style x:Key="CalendarItemStyle1" TargetType="{x:Type CalendarItem}">
|
11
|
+
<Setter Property="Margin" Value="0,3,0,3"/>
|
12
|
+
<Setter Property="Template">
|
13
|
+
<Setter.Value>
|
14
|
+
<ControlTemplate TargetType="{x:Type CalendarItem}">
|
15
|
+
<ControlTemplate.Resources>
|
16
|
+
<DataTemplate x:Key="{x:Static CalendarItem.DayTitleTemplateResourceKey}">
|
17
|
+
<TextBlock Foreground="SkyBlue" FontWeight="Bold" FontSize="9.5" FontFamily="Verdana" HorizontalAlignment="Center" Margin="0,6,0,6" Text="{Binding}" VerticalAlignment="Center"/>
|
18
|
+
<!-- ↑ここ-->
|
19
|
+
</DataTemplate>
|
20
|
+
</ControlTemplate.Resources>
|
21
|
+
<Grid x:Name="PART_Root">
|
22
|
+
<Grid.Resources>
|
23
|
+
<SolidColorBrush x:Key="DisabledColor" Color="#A5FFFFFF"/>
|
24
|
+
</Grid.Resources>
|
25
|
+
<VisualStateManager.VisualStateGroups>
|
26
|
+
<VisualStateGroup x:Name="CommonStates">
|
27
|
+
<VisualState x:Name="Normal"/>
|
28
|
+
<VisualState x:Name="Disabled">
|
29
|
+
<Storyboard>
|
30
|
+
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PART_DisabledVisual"/>
|
31
|
+
</Storyboard>
|
32
|
+
</VisualState>
|
33
|
+
</VisualStateGroup>
|
34
|
+
</VisualStateManager.VisualStateGroups>
|
35
|
+
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="1">
|
36
|
+
<Border BorderBrush="#FFFFFFFF" BorderThickness="2" CornerRadius="1">
|
37
|
+
<Grid>
|
38
|
+
<Grid.Resources>
|
39
|
+
<ControlTemplate x:Key="PreviousButtonTemplate" TargetType="{x:Type Button}">
|
40
|
+
<Grid Cursor="Hand">
|
41
|
+
<VisualStateManager.VisualStateGroups>
|
42
|
+
<VisualStateGroup x:Name="CommonStates">
|
43
|
+
<VisualState x:Name="Normal"/>
|
44
|
+
<VisualState x:Name="MouseOver">
|
45
|
+
<Storyboard>
|
46
|
+
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path"/>
|
47
|
+
</Storyboard>
|
48
|
+
</VisualState>
|
49
|
+
<VisualState x:Name="Disabled">
|
50
|
+
<Storyboard>
|
51
|
+
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" Storyboard.TargetName="path"/>
|
52
|
+
</Storyboard>
|
53
|
+
</VisualState>
|
54
|
+
</VisualStateGroup>
|
55
|
+
</VisualStateManager.VisualStateGroups>
|
56
|
+
<Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
|
57
|
+
<Grid>
|
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"/>
|
59
|
+
</Grid>
|
60
|
+
</Grid>
|
61
|
+
</ControlTemplate>
|
62
|
+
<ControlTemplate x:Key="NextButtonTemplate" TargetType="{x:Type Button}">
|
63
|
+
<Grid Cursor="Hand">
|
64
|
+
<VisualStateManager.VisualStateGroups>
|
65
|
+
<VisualStateGroup x:Name="CommonStates">
|
66
|
+
<VisualState x:Name="Normal"/>
|
67
|
+
<VisualState x:Name="MouseOver">
|
68
|
+
<Storyboard>
|
69
|
+
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path"/>
|
70
|
+
</Storyboard>
|
71
|
+
</VisualState>
|
72
|
+
<VisualState x:Name="Disabled">
|
73
|
+
<Storyboard>
|
74
|
+
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="(Shape.Fill).(Brush.Opacity)" Storyboard.TargetName="path"/>
|
75
|
+
</Storyboard>
|
76
|
+
</VisualState>
|
77
|
+
</VisualStateGroup>
|
78
|
+
</VisualStateManager.VisualStateGroups>
|
79
|
+
<Rectangle Fill="#11E5EBF1" Opacity="1" Stretch="Fill"/>
|
80
|
+
<Grid>
|
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"/>
|
82
|
+
</Grid>
|
83
|
+
</Grid>
|
84
|
+
</ControlTemplate>
|
85
|
+
<ControlTemplate x:Key="HeaderButtonTemplate" TargetType="{x:Type Button}">
|
86
|
+
<Grid Cursor="Hand">
|
87
|
+
<VisualStateManager.VisualStateGroups>
|
88
|
+
<VisualStateGroup x:Name="CommonStates">
|
89
|
+
<VisualState x:Name="Normal"/>
|
90
|
+
<VisualState x:Name="MouseOver">
|
91
|
+
<Storyboard>
|
92
|
+
<ColorAnimation Duration="0" To="#FF73A9D8" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="buttonContent"/>
|
93
|
+
</Storyboard>
|
94
|
+
</VisualState>
|
95
|
+
<VisualState x:Name="Disabled">
|
96
|
+
<Storyboard>
|
97
|
+
<DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="buttonContent"/>
|
98
|
+
</Storyboard>
|
99
|
+
</VisualState>
|
100
|
+
</VisualStateGroup>
|
101
|
+
</VisualStateManager.VisualStateGroups>
|
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}"/>
|
103
|
+
</Grid>
|
104
|
+
</ControlTemplate>
|
105
|
+
</Grid.Resources>
|
106
|
+
<Grid.ColumnDefinitions>
|
107
|
+
<ColumnDefinition Width="Auto"/>
|
108
|
+
<ColumnDefinition Width="Auto"/>
|
109
|
+
<ColumnDefinition Width="Auto"/>
|
110
|
+
</Grid.ColumnDefinitions>
|
111
|
+
<Grid.RowDefinitions>
|
112
|
+
<RowDefinition Height="Auto"/>
|
113
|
+
<RowDefinition Height="*"/>
|
114
|
+
</Grid.RowDefinitions>
|
115
|
+
<Button x:Name="PART_PreviousButton" Grid.Column="0" Focusable="False" HorizontalAlignment="Left" Height="20" Grid.Row="0" Template="{StaticResource PreviousButtonTemplate}" Width="28"/>
|
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"/>
|
117
|
+
<Button x:Name="PART_NextButton" Grid.Column="2" Focusable="False" HorizontalAlignment="Right" Height="20" Grid.Row="0" Template="{StaticResource NextButtonTemplate}" Width="28"/>
|
118
|
+
<Grid x:Name="PART_MonthView" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="6,-1,6,6" Grid.Row="1" Visibility="Visible">
|
119
|
+
<Grid.ColumnDefinitions>
|
120
|
+
<ColumnDefinition Width="Auto"/>
|
121
|
+
<ColumnDefinition Width="Auto"/>
|
122
|
+
<ColumnDefinition Width="Auto"/>
|
123
|
+
<ColumnDefinition Width="Auto"/>
|
124
|
+
<ColumnDefinition Width="Auto"/>
|
125
|
+
<ColumnDefinition Width="Auto"/>
|
126
|
+
<ColumnDefinition Width="Auto"/>
|
127
|
+
</Grid.ColumnDefinitions>
|
128
|
+
<Grid.RowDefinitions>
|
129
|
+
<RowDefinition Height="Auto"/>
|
130
|
+
<RowDefinition Height="Auto"/>
|
131
|
+
<RowDefinition Height="Auto"/>
|
132
|
+
<RowDefinition Height="Auto"/>
|
133
|
+
<RowDefinition Height="Auto"/>
|
134
|
+
<RowDefinition Height="Auto"/>
|
135
|
+
<RowDefinition Height="Auto"/>
|
136
|
+
</Grid.RowDefinitions>
|
137
|
+
</Grid>
|
138
|
+
<Grid x:Name="PART_YearView" Grid.ColumnSpan="3" HorizontalAlignment="Center" Margin="6,-3,7,6" Grid.Row="1" Visibility="Hidden">
|
139
|
+
<Grid.ColumnDefinitions>
|
140
|
+
<ColumnDefinition Width="Auto"/>
|
141
|
+
<ColumnDefinition Width="Auto"/>
|
142
|
+
<ColumnDefinition Width="Auto"/>
|
143
|
+
<ColumnDefinition Width="Auto"/>
|
144
|
+
</Grid.ColumnDefinitions>
|
145
|
+
<Grid.RowDefinitions>
|
146
|
+
<RowDefinition Height="Auto"/>
|
147
|
+
<RowDefinition Height="Auto"/>
|
148
|
+
<RowDefinition Height="Auto"/>
|
149
|
+
</Grid.RowDefinitions>
|
150
|
+
</Grid>
|
151
|
+
</Grid>
|
152
|
+
</Border>
|
153
|
+
</Border>
|
154
|
+
<Rectangle x:Name="PART_DisabledVisual" Fill="{StaticResource DisabledColor}" Opacity="0" RadiusY="2" RadiusX="2" Stretch="Fill" Stroke="{StaticResource DisabledColor}" StrokeThickness="1" Visibility="Collapsed"/>
|
155
|
+
</Grid>
|
156
|
+
<ControlTemplate.Triggers>
|
157
|
+
<Trigger Property="IsEnabled" Value="False">
|
158
|
+
<Setter Property="Visibility" TargetName="PART_DisabledVisual" Value="Visible"/>
|
159
|
+
</Trigger>
|
160
|
+
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Year">
|
161
|
+
<Setter Property="Visibility" TargetName="PART_MonthView" Value="Hidden"/>
|
162
|
+
<Setter Property="Visibility" TargetName="PART_YearView" Value="Visible"/>
|
163
|
+
</DataTrigger>
|
164
|
+
<DataTrigger Binding="{Binding DisplayMode, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Calendar}}}" Value="Decade">
|
165
|
+
<Setter Property="Visibility" TargetName="PART_MonthView" Value="Hidden"/>
|
166
|
+
<Setter Property="Visibility" TargetName="PART_YearView" Value="Visible"/>
|
167
|
+
</DataTrigger>
|
168
|
+
</ControlTemplate.Triggers>
|
169
|
+
</ControlTemplate>
|
170
|
+
</Setter.Value>
|
171
|
+
</Setter>
|
172
|
+
</Style>
|
173
|
+
</Window.Resources>
|
174
|
+
<StackPanel Orientation="Horizontal">
|
175
|
+
<Calendar x:Name="custom" CalendarItemStyle="{DynamicResource CalendarItemStyle1}" />
|
176
|
+
<Calendar x:Name="normal" />
|
177
|
+
</StackPanel>
|
178
|
+
</Window>
|
179
179
|
```
|