Questions tagged [updatesourcetrigger]

79 questions
13
votes
1 answer

Text on TextBox with UpdateSourceTrigger=PropertyChanged is not updated when coercion of text input results in unchanged source value

I have a text box whose Text property has a TwoWay MultiBinding with UpdateSourceTrigger set to PropertyChanged. The first Binding is to a dependency property (Value) which has a PropertyChangedCallBack function that rounds the value to one decimal…
Neo
  • 4,145
  • 6
  • 53
  • 76
9
votes
3 answers

Custom UpdateSourceTrigger with delay?

I'm looking to create a custom version of UpdateSourceTrigger that I can use with my binding. I don't know if this is possible, or if instead, I'd need to just create my own binding class. What I'm looking for is, instead of LostFocus or…
Thelonias
  • 2,918
  • 3
  • 29
  • 63
9
votes
3 answers

Is there a way to globally change the default behaviors of bindings in wpf?

Is there a way to change the default behavior of bindings so i don't need to set 'UpdateSourceTrigger=PropertyChanged' on each, in my case, textbox? Might this be done via a ControlTemplate or Style?
Cinaird
  • 785
  • 4
  • 13
  • 33
7
votes
3 answers

How to set and get updatesourcetrigger of a textbox in codebehind?

Just a short question : In wpf, how do I set and get updatesourcetrigger of a textbox in codebehind ? Thanks Update : I follow AngleWPF's code : var bndExp = BindingOperations.GetBindingExpression(this, TextBox.TextProperty); var…
JatSing
  • 4,857
  • 16
  • 55
  • 65
7
votes
2 answers

Set UpdateSourceTrigger to Explicit in ShowDialog (WPF MVVM)

I saw this example - Binding.UpdateSourceTrigger Property in the example the UpdateSourceTrigger set to Explicit and then in the view code he call to UpdateSource of the TextBox name. But if i use the MVVM dp i dont want to have names to my…
Maya
  • 989
  • 4
  • 12
  • 19
6
votes
2 answers
5
votes
2 answers

How do you call UpdateSource() for explicit binding on a DataGrid?

I have a DataGrid that contains information from a settings object. Currently there is two-way binding between the DataGrid and settings object. However, I want to put a "Save" button in that only binds changes made in the DataGrid to the object if…
reubonwry
  • 317
  • 4
  • 15
5
votes
2 answers

WPFToolkit DataGrid: Combobox column does not update selectedvaluebinding immediately

I'm using WPF Toolkit DataGrid and DataGridComboBoxColumn. Everything works well, except that when selection change happens on the combobox, the selectedvaluebinding source is not updated immediately. This happens only when the combobox loses focus.…
neblinc1
  • 383
  • 4
  • 14
5
votes
4 answers

Workaround for UpdateSourceTrigger LostFocus on Silverlight Datagrid?

I have a Silverlight 2 application that validates data OnTabSelectionChanged. Immediately I began wishing that UpdateSourceTrigger allowed more than just LostFocus because if you click the tab without tabbing off of a control the LINQ object is not…
Dave Lowther
  • 408
  • 6
  • 13
5
votes
3 answers

KeyBinding with Command Binding dont work with TextBox UpdateSourceTrigger LostFocus

I'm using MVVM and have the following problem. My TextBox.Text is bound with UpdateSourceTrigger=LostFocus (thats what the user want). I have a Button with a SaveCommand CommandBinding - this works. Now i have a KeyBinding with Strg+S wich also…
blindmeis
  • 22,175
  • 7
  • 55
  • 74
4
votes
3 answers

A weird behavior of PropertyChanged UpdataSourceTrigger in WPF

I have an entity like this: public class Person { public string Name { get; set; } public Person() { Name = "Godspeed"; } } Then I have three textbox and a button in XAML:
Howard
  • 3,638
  • 4
  • 32
  • 39
4
votes
2 answers

TextBox UpdateSourceTrigger = PropertyChanged - does it really affect performance?

The MSDN documentation states: Bindings that are TwoWay or OneWayToSource listen for changes in the target property and propagate them back to the source. This is known as updating the source. Usually, these updates happen whenever the…
Ross
  • 4,460
  • 2
  • 32
  • 59
4
votes
1 answer

UpdateSourceTrigger PropertyChanged in Silverlight?

I am sure most of you have come across this when you type in a textbox you like instantly to filter a ViewCollection according to has been typed. Its very straight forward in WPF, just change the UpdateSourceTrigger for Text binding to…
Houman
  • 64,245
  • 87
  • 278
  • 460
4
votes
1 answer

How to use update source trigger on Wpf Combobox which is editable?

I have a combo box (in my wpf-mvvm app). I have set IsEditable = true. But the "property changed event" is getting fired when I start typing. How can I set UpdateSourceTrigger = Propertychanged here ? Also..I need to call a validation function if…
Relativity
  • 6,690
  • 22
  • 78
  • 128
3
votes
0 answers

Reset/Delete a push (not a commit) in GIT using Sourcetree

Is there a way to reset/delete a push (not a commit) in GIT using Sourcetree? Thanks
user3399784
1
2 3 4 5 6