Questions tagged [propertychanged]
221 questions
7
votes
4 answers
PropertyChangeSupport for SpinnerNumberModel
I want to listen to the changes of the value of the SpinnerNumberModel for a JSpinner.
I create a PropertyChangeSupport and put the model into it.
I need the propertyChangeListener, because it shows me the old and new value of the property.
The…

timaschew
- 16,254
- 6
- 61
- 78
7
votes
2 answers
Raise an event when Property Changed using Reflection
I am working in C# and I have an object which I can only access using Reflection (for some personal reasons). So, when I need to set some value to one of its properties I do as below:
System.Reflection.PropertyInfo property =…

Dante
- 3,208
- 9
- 38
- 56
6
votes
3 answers
Why use this construct - PropertyChangedEventHandler handler = this.PropertyChanged?
The article http://msdn.microsoft.com/en-us/magazine/dd419663.aspx has the following code sample:
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName)
{
…

sturdytree
- 849
- 3
- 12
- 26
6
votes
1 answer
WPF ValidationRules disables PropertyChanged
I have the following textbox that have a propertychanged in the viewmodel.
When I insert the Binding.ValidationRules and I insert some wrong value, it doesn't trigger the propertychanged event and I don't understand why. Any help?

Louro
- 1,413
- 4
- 21
- 27
5
votes
5 answers
Raising a PropertyChanged event during a Pause in TextBox entry?
I was wondering if it's possible to raise a PropertyChanged event when the user pauses while typing text into a TextBox? Or more specifically, I want to run a method X seconds after the user stops typing in a TextBox.
For example, I have a form with…

Rachel
- 130,264
- 66
- 304
- 490
5
votes
2 answers
C# Wpf Editing Datagrid does not update it's itemsource
I have an ObservableCollection like this,
ObservableCollection- Found_Items = new ObservableCollection
- ();
public struct Item
{
public bool Enabled { get; set; }
public BitmapImage ItemIcon { get; set; }
…

Trax
- 943
- 2
- 12
- 30
5
votes
1 answer
What can i do with RaisePropertyChanged?
I'm using MVVM Light in a Windows Phone Silverlight application.
I don't really get how RaisePropertyChanged should works; Let me explain, in code like this
private Recipe _selectedRecipe;
public Recipe SelectedRecipe
{
get
{
return…

maxdelia
- 858
- 2
- 14
- 35
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
remove lambda expression from PropertyChanged (equivalent of p.PropertyChanged -= (s,a) => { ... })
I have a class that implements PropertyChanged. I do something similar to this to subscribe to it:
p.PropertyChanged += (s, a) => {
switch ( a.PropertyName) {
...
}
}
How can I later unsubscribe the above code from the…

John T
- 97
- 1
- 7
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
Xamarin.Forms & MVVM In C#: PropertyChanged Event Handler Is Always Null When OnPropertyChanged Called
I've written a simple application using Xamarin.Forms in C# with Visual Studio 2017, and have a problem with data binding working to update the contents of a Label child control to display the selected date value from a DatePicker child control in…

ClockEndGooner
- 672
- 1
- 12
- 24
4
votes
1 answer
INotifyPropertyChanged not firing PropertyChanged
I have searched the forums for a solution but none of the listed solutions have helped. I'm assuming my implementation is off but I don't understand what or why.
Using Xamarin forms I am trying to get a label to update when an object's data is…

Carson
- 400
- 2
- 15
4
votes
2 answers
Making mocks trigger PropertyChanged when changed
I am using RhinoMocks, and I have a Mock which has a property I need to behave as a real property - updating its value when set, and also trigger PropertyChanged when the property is changed.
The interface of the mocked object is in essence this:…

stiank81
- 25,418
- 43
- 131
- 202
4
votes
2 answers
C# - How to determine whether a property is changed
I need to know whether a public property (which has getter & setter) is changed. The property is in a simple class (no user control/component etc).
Is there an elegant way to subscribe to some kind of event which notifies when property is changed?
I…

Adi Barda
- 3,259
- 11
- 32
- 33
4
votes
2 answers
C# - How do I change the value of a property based on changes to another property (ObservableCollection)?
How do I change the value of TotalPublicationsRead, when the Read property of a Publication has changed?
public class Report
{
public ObservableCollection Publications { get; set; }
public int TotalPublicationsRead { get; set;…

empo
- 1,133
- 5
- 21
- 41