Click here to Skip to main content
15,917,538 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Combobox / Textblock field Pin
Jason Gleim21-Jan-14 10:25
professionalJason Gleim21-Jan-14 10:25 
GeneralRe: Combobox / Textblock field Pin
eddieangel21-Jan-14 11:29
eddieangel21-Jan-14 11:29 
GeneralRe: Combobox / Textblock field Pin
Jason Gleim22-Jan-14 4:28
professionalJason Gleim22-Jan-14 4:28 
GeneralRe: Combobox / Textblock field Pin
eddieangel22-Jan-14 5:34
eddieangel22-Jan-14 5:34 
QuestionHow to stop repeating animation Pin
Member 1001614016-Jan-14 12:25
Member 1001614016-Jan-14 12:25 
AnswerRe: How to stop repeating animation Pin
Varsha Ramnani20-Jan-14 22:41
professionalVarsha Ramnani20-Jan-14 22:41 
QuestionWPF Checkbox Binding Question Pin
Kevin Marois10-Jan-14 8:38
professionalKevin Marois10-Jan-14 8:38 
AnswerRe: WPF Checkbox Binding Question Pin
Meshack Musundi12-Jan-14 8:28
professionalMeshack Musundi12-Jan-14 8:28 
AnswerRe: WPF Checkbox Binding Question Pin
eddieangel21-Jan-14 7:53
eddieangel21-Jan-14 7:53 
QuestionVS2013: cannot locate resource Pin
Anthony.Canossi9-Jan-14 4:47
Anthony.Canossi9-Jan-14 4:47 
AnswerRe: VS2013: cannot locate resource Pin
Mycroft Holmes9-Jan-14 11:49
professionalMycroft Holmes9-Jan-14 11:49 
GeneralRe: VS2013: cannot locate resource Pin
Anthony.Canossi9-Jan-14 21:25
Anthony.Canossi9-Jan-14 21:25 
GeneralRe: VS2013: cannot locate resource Pin
Mycroft Holmes9-Jan-14 21:37
professionalMycroft Holmes9-Jan-14 21:37 
GeneralRe: VS2013: cannot locate resource Pin
Anthony.Canossi9-Jan-14 22:28
Anthony.Canossi9-Jan-14 22:28 
AnswerRe: VS2013: cannot locate resource Pin
Meshack Musundi12-Jan-14 7:53
professionalMeshack Musundi12-Jan-14 7:53 
GeneralRe: VS2013: cannot locate resource Pin
Anthony.Canossi12-Jan-14 21:31
Anthony.Canossi12-Jan-14 21:31 
QuestionDragging A Control - Problem Pin
Kevin Marois8-Jan-14 10:13
professionalKevin Marois8-Jan-14 10:13 
AnswerRe: Dragging A Control - Problem Pin
Meshack Musundi12-Jan-14 7:58
professionalMeshack Musundi12-Jan-14 7:58 
Questionupdate linq query result Pin
amigoface5-Jan-14 3:12
amigoface5-Jan-14 3:12 
QuestionLearn Wpf Pin
Member 105030394-Jan-14 2:00
Member 105030394-Jan-14 2:00 
AnswerRe: Learn Wpf Pin
Peter Leow4-Jan-14 2:16
professionalPeter Leow4-Jan-14 2:16 
AnswerRe: Learn Wpf Pin
Richard MacCutchan4-Jan-14 2:34
mveRichard MacCutchan4-Jan-14 2:34 
QuestionData Template Checkbox Binding Question Pin
Kevin Marois2-Jan-14 7:16
professionalKevin Marois2-Jan-14 7:16 
AnswerRe: Data Template Checkbox Binding Question Pin
Wayne Gaylard2-Jan-14 19:21
professionalWayne Gaylard2-Jan-14 19:21 
I assume your model implements INotifyPropertyChanged Interface. In your VM, you can subscribe to the model's property changed event, and then check if the IsChecked property is the one being changed. If the instance of the model is inside a collection (I assume it is as this is a hierarchicaltemplate), you will need to subscribe to the collection's collection changed event, then inside that method, you subscribe to each instance's property changed event.

Something like this

C#
Items.CollectionChanged += ItemsChanged;

private void ItemsCHanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            if(e.NewItems != null)
            {
                foreach(Item item in e.NewItems)
                {
                    //Subscribe to property changed
                    item.PropertyChanged += ItemChanged;
                }
            }
            if (e.OldItems != null)
            {
                foreach (Item item in e.OldItems)
                {
                    //Ensure you unsubscribe
                    item.PropertyChanged -= ItemChanged;
                }
            }
        }

        private void ItemChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
           if(e.PropertyName == "IsChecked")
           {
               //Do work here
           }
        }

When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman

GeneralRe: Data Template Checkbox Binding Question Pin
Kevin Marois10-Jan-14 10:50
professionalKevin Marois10-Jan-14 10:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.