프로그래밍/C#

[WPF] Textbox 값 변경 이벤트

Victory_HA 2022. 10. 7. 09:21

XAML

<TextBox  TextChanged="textChangedEventHandler">
  Here is the initial text in my TextBox.  Each time the contents of this TextBox are changed, 
  the TextChanged event  fires and textChangedEventHandler is called.
</TextBox>

CS

// TextChangedEventHandler delegate method.
private void textChangedEventHandler(object sender, TextChangedEventArgs args)
{
    // Omitted Code: Insert code that does something whenever
    // the text changes...
} // end textChangedEventHandler