回答編集履歴

1

見直しキャンペーン中

2023/07/23 05:00

投稿

TN8001
TN8001

スコア9862

test CHANGED
@@ -1,133 +1,67 @@
1
1
  普通に通りますけど。。Releaseモードってことはないですよね?
2
2
 
3
-
4
-
5
- ```xaml
3
+ ```xml
6
-
7
4
  <Window
8
-
9
5
  x:Class="Questions288263.Views.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
  xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
16
-
17
9
  xmlns:l="http://schemas.livet-mvvm.net/2011/wpf"
18
-
19
10
  xmlns:v="clr-namespace:Questions288263.Views"
20
-
21
11
  xmlns:vm="clr-namespace:Questions288263.ViewModels"
22
-
23
12
  Title="MainWindow"
24
-
25
13
  Width="525"
26
-
27
14
  Height="350">
28
15
 
29
-
30
-
31
16
  <Window.DataContext>
32
-
33
17
  <vm:EntryViewModel />
34
-
35
18
  </Window.DataContext>
36
19
 
37
-
38
-
39
20
  <behaviors:Interaction.Triggers>
40
-
41
21
  <behaviors:EventTrigger EventName="ContentRendered">
42
-
43
22
  <l:LivetCallMethodAction MethodName="Initialize" MethodTarget="{Binding}" />
44
-
45
23
  </behaviors:EventTrigger>
46
-
47
24
  <behaviors:EventTrigger EventName="Closed">
48
-
49
25
  <l:DataContextDisposeAction />
50
-
51
26
  </behaviors:EventTrigger>
52
-
53
27
  </behaviors:Interaction.Triggers>
54
28
 
55
-
56
-
57
29
  <Grid>
58
-
59
30
  <TextBox Text="{Binding ItemCodeText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
60
-
61
31
  </Grid>
62
-
63
32
  </Window>
64
-
65
33
  ```
66
34
 
67
-
68
-
69
- ```C#
35
+ ```cs
70
-
71
36
  using System.Diagnostics;
72
-
73
37
  using Livet;
74
38
 
75
-
76
-
77
39
  namespace Questions288263.ViewModels
78
-
79
40
  {
80
-
81
41
  public class EntryViewModel : ViewModel
82
-
83
42
  {
84
-
85
43
  private string _ItemCodeText;
86
44
 
87
-
88
-
89
45
  public string ItemCodeText
90
-
91
46
  {
92
-
93
47
  get { return _ItemCodeText; }
94
-
95
48
  set
96
-
97
49
  {
98
-
99
50
  // これ意味ありますか??
100
-
101
51
  if(_ItemCodeText == null)
102
-
103
52
  {
104
-
105
53
  _ItemCodeText = ItemCodeText;
106
-
107
54
  }
108
-
109
-
110
55
 
111
56
  if(_ItemCodeText == value) return;
112
57
 
113
-
114
-
115
58
  Debug.WriteLine($"set ItemCodeText={value}");
116
-
117
59
  _ItemCodeText = value;
118
-
119
60
  RaisePropertyChanged();
120
-
121
61
  }
122
-
123
62
  }
124
63
 
125
-
126
-
127
64
  public void Initialize() { }
128
-
129
65
  }
130
-
131
66
  }
132
-
133
67
  ```