Questions tagged [updatesourcetrigger]
79 questions
0
votes
1 answer
WPF, Update ComboBox ItemsSource when it's DataContext changes
I have two classes A and B which both implement an interface IThingWithList.
public interface IThingWithList
{
ObservableCollection TheList;
}
TheList in A contains 1, 2, 3
TheList in B contains 4, 5, 6
I have a controller class which has a…

Mark Mercer
- 105
- 7
0
votes
1 answer
Why the UpdateSourceTrigger=Propertychanged dose not work correctly in IntegerUpdown?
My question is based on How to set a restriction to WPF IntegerUpDown toolkit? that I've posted a while ago.
I have two WPF IntegerUpdown controls, one represents the maximum number and the other represents the minimum number , the first should be…
user14743092
0
votes
1 answer
Is binding of UpdateSourceTrigger to a DependencyProperty possible?
i want to set UpdateSourceTrigger of the Binding of a PasswordBox to LostFocus or PropertyChanged dynamically.
Is there a way to bind UpdateSourceTrigger of a Binding to a DependencyProperty like this?
Password="{Binding Path=PasswordProperty,…

Stelzy
- 3
- 1
0
votes
0 answers
Point is no longer accepted when I use the property UpdateSourceTrigger
I used the property "UpdateSourceTrigger = PropertChanged". I am binding on a double. However, I can not do a '.' anymore, this is simply filtered out / deleted. How can I fix this an continue to use the property?
My Property:
private double…

Fabian
- 19
- 3
0
votes
1 answer
How can I prevent UpdateSource on calculated bound textboxes as data loads?
As users enter numbers into 3 text boxes I calculate the average in a 4th text box. The CalculateAverage method is called from the TextChanged event of the first 3 text boxes. All text boxes are bound. (Note: I know calculated values should not be…

DeveloperDan
- 4,626
- 9
- 40
- 65
0
votes
0 answers
FrameworkPropertyMetadata.DefaultUpdateSourceTrigger doesn't set the default?
I have a UserControl for quantities called QtyControl, with a DependencyProperty called Qty (an int). I'm registering this property with DefaultUpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged, but if I don't put…

Matt Gregory
- 8,074
- 8
- 33
- 40
0
votes
2 answers
Conditional binding two properties to one Textbox
Hello Dear Programmers
I decided to learn MVVP pattern using C# language. That is why I have one question for you. I have a very simple application which consists of 5 textboxes and one button. It is not finished yet.
What I achieved:
When I write…
0
votes
1 answer
Let user enter spaces between words but remove leading and trailing spaces when using PropertyChanged
In the following code, I'm doing a search as soon as the seventh character is entered. Everything is working fine except that the user cannot type spaces because, as expected they are getting removed every time a new character is entered since I'm…

fs_tigre
- 10,650
- 13
- 73
- 146
0
votes
1 answer
UpdateSourceTrigger for Datacontext in Silverlight
Hi
I am working on a MVVM Silverlight app and i use UpdateSourceTrigger Property of TextBox to update the bindingexpression in runtime as follows:
.xaml.cs:
BindingExpression beID =…

SARAVAN
- 14,571
- 16
- 49
- 70
0
votes
1 answer
Update others cells in a DataGrid row after editing one
I have a class like this:
public class Example
{
public Example()
{
}
public int Count1 { get; set; }
public int Count2 { get; set; }
public int Count3 { get { return Count1 + Count2 ; } }
}
And a DataGrid with a…

Wesley Santos
- 3
- 1
0
votes
1 answer
Update Label when dataBind changes
I need to set a UpdateSourceTrigger, PropertyChanged from code behind but at this moment I have not found any way to do.
I am trying with the following code:
factory.SetBinding(ContentProperty, new UpdateSourceTrigger("PropertyChanged"));
And my…

Nega developer
- 259
- 3
- 8
- 19
0
votes
1 answer
LostFocus Binding missing setter call
I have a problem with a two-way Binding on a TextBox.
On leaving the Focus of this element I would like to have a setter call of MyText, even if the Text…

WPFGermany
- 1,639
- 2
- 12
- 30
0
votes
1 answer
Wpf: The text block doesn't update after change
I have Wpf application that uses MVVM and the code looks as following:
XAML:
0
votes
0 answers
How to prevent updating a focused TextBox
I'm working on a simple WPF currency converter program which has to convert Dollars to Euros and vice versa. I am using IValueConverter for tow TextBoxes on a single Property. This works, however whenever I change one textbox, it will convert the…

oddRaven
- 672
- 1
- 7
- 20
0
votes
1 answer
WPF MVVM UpdateSourceTrigger=Excplict
i've a contentcontrol in my Wpf-App (MVVM) which is bound to an object and displays the objects properties in textboxes, so the user can edit the values of the properties.
I want to implement undo/redo functionality with the command pattern of the…

Walter
- 61
- 1
- 3