回答編集履歴

1

見直しキャンペーン中

2023/07/25 15:25

投稿

TN8001
TN8001

スコア9396

test CHANGED
@@ -1,91 +1,44 @@
1
1
  > 問題1
2
2
 
3
-
4
-
5
3
  まず`BackGroundConverter`の型が違います。
6
-
7
-
8
-
9
- ```xaml
4
+ ```xml
10
-
11
5
  <!--<local:BrushConverter x:Key="BackGroundConverter" />-->
12
-
13
6
  <local:BackGroundConverter x:Key="BackGroundConverter" />
14
-
15
7
  ```
16
8
 
17
-
18
-
19
9
  なんでもいいですが、なにかしらに`{TemplateBinding Background}`します。
20
-
21
-
22
-
23
- ```xaml
10
+ ```xml
24
-
25
11
  <Style x:Key="DefaultCalendarDayButtonStyle" TargetType="{x:Type CalendarDayButton}">
26
-
27
12
  <Setter Property="Background" Value="{Binding Converter={StaticResource BackGroundConverter}, Mode=OneWay}" />
28
-
29
13
  <Setter Property="Foreground" Value="{Binding Converter={StaticResource BrushConverter}, Mode=OneWay}" />
30
-
31
14
  <Setter Property="Template">
32
-
33
15
  <Setter.Value>
34
-
35
16
  <ControlTemplate TargetType="{x:Type CalendarDayButton}">
36
-
37
17
  <Border Background="{TemplateBinding Background}">
38
-
39
18
  <ContentPresenter
40
-
41
19
  x:Name="NormalText"
42
-
43
20
  Margin="5,1,5,1"
44
-
45
21
  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
46
-
47
22
  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
48
-
49
23
  </Border>
50
-
51
24
  </ControlTemplate>
52
-
53
25
  </Setter.Value>
54
-
55
26
  </Setter>
56
-
57
27
  </Style>
58
-
59
28
  ```
60
-
61
-
62
29
 
63
30
  > 問題2
64
31
 
65
-
66
-
67
32
  ページ(月)を変えると反映されるようなので、強制的に切り替えてみました。
68
33
 
69
-
70
-
71
- 特にちらつき等はありませんが、月ビュー?になっていないと戻った時に変わっていませんでした^^;
34
+ 特にちらつき等はありませんが、月ビュー?になっていないと戻った時に変わっていませんでした
72
-
73
35
  ちゃんとやるなら月ビュー?にしたうえで切り替えて、さらにビューを戻す等?
74
36
 
75
-
76
-
77
- ```C#
37
+ ```cs
78
-
79
38
  var date = DateTime.ParseExact(txt.Text, "yyyyMMdd", null);
80
-
81
39
  list.Add(date);
82
40
 
83
-
84
-
85
41
  var d = custom.DisplayDate;
86
-
87
42
  custom.DisplayDate = new DateTime();
88
-
89
43
  custom.DisplayDate = d;
90
-
91
44
  ```