普通に通りますけど。。Releaseモードってことはないですよね?
xml
1<Window
2 x:Class="Questions288263.Views.MainWindow"
3 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5 xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
6 xmlns:l="http://schemas.livet-mvvm.net/2011/wpf"
7 xmlns:v="clr-namespace:Questions288263.Views"
8 xmlns:vm="clr-namespace:Questions288263.ViewModels"
9 Title="MainWindow"
10 Width="525"
11 Height="350">
12
13 <Window.DataContext>
14 <vm:EntryViewModel />
15 </Window.DataContext>
16
17 <behaviors:Interaction.Triggers>
18 <behaviors:EventTrigger EventName="ContentRendered">
19 <l:LivetCallMethodAction MethodName="Initialize" MethodTarget="{Binding}" />
20 </behaviors:EventTrigger>
21 <behaviors:EventTrigger EventName="Closed">
22 <l:DataContextDisposeAction />
23 </behaviors:EventTrigger>
24 </behaviors:Interaction.Triggers>
25
26 <Grid>
27 <TextBox Text="{Binding ItemCodeText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
28 </Grid>
29</Window>
cs
1using System.Diagnostics;
2using Livet;
3
4namespace Questions288263.ViewModels
5{
6 public class EntryViewModel : ViewModel
7 {
8 private string _ItemCodeText;
9
10 public string ItemCodeText
11 {
12 get { return _ItemCodeText; }
13 set
14 {
15 // これ意味ありますか??
16 if(_ItemCodeText == null)
17 {
18 _ItemCodeText = ItemCodeText;
19 }
20
21 if(_ItemCodeText == value) return;
22
23 Debug.WriteLine($"set ItemCodeText={value}");
24 _ItemCodeText = value;
25 RaisePropertyChanged();
26 }
27 }
28
29 public void Initialize() { }
30 }
31}