Develop

wpf textbox twoway

작은이야기 2018. 12. 13. 18:14
<TextBox x:Name="CommandInputText" Grid.Row="1" Grid.Column="1" 
	TextWrapping="Wrap" 
	Text="{Binding Path=CommandInputText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
	Width="auto" Height="auto" TextAlignment="Left" 
	VerticalContentAlignment="Center" Background="LightGray"
	TextChanged="CommandInputText_TextChanged"/>

private string commandInputText;
public string CommandInputText
{
  get
  {
	return this.commandInputText;
  }
  set
  {
	this.commandInputText = value;
	this.NotifyOfPropertyChange("CommandInputText");
  }
}


Caliburn.Micro 사용