1

Background

I'd like to change WPF's Textbox.Text's default UpdateSourceTrigger from LostFocus to PropertyChanged I've seen a few older questions seeking to do the same thing however, I haven't found a reasonable response.

What I've Tried

<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextBoxBase}">
    <Setter Property="Text" Value="{Binding Path=Binding, UpdateSourceTrigger=PropertyChanged}"/>
</Style>

I've tried changing it in a style with no luck.

The Question

How do I change the default TextBox.Text's UpdateSourceTrigger to PropertyChanged for every TextBox?

Notes

  • I'd prefer not creating a new class that inherits from TextBox as I already have quite a few.
Charles W
  • 2,262
  • 3
  • 25
  • 38
  • A markup extension is the way to go. It may have upsides and downsides you're not happy with, but it's deffo the way to approach it. – Gayot Fow Jun 04 '14 at 18:11

0 Answers0