Search Results

Search found 4 results on 1 pages for 'yossharel'.

Page 1/1 | 1 

  • It's possible to create variable to hold fields of class dynamically???

    - by yossharel
    hi all, In my 'Person' class, I have some fields like 'firstname','lastname','nickname' and so on. I want to write code to search dynamically, sometimes by 'firstname' and sometimes by 'nickname' field. The code I want to write, should be like this: Object someVariable = "firstname"; Person result = ListOfPerson.Where(p => p.someVariable = "exp").FirstOrDefault(); Can anyone Know if it's possible?

    Read the article

  • Implement INotifyPropertyChanged

    - by yossharel
    Hi all, I want to have Dictionary that would be 'Observable' in order to throw events when its item changing.(Remove or Add). In other class I created such dictionary and set Binding to ListBox.ItemsSourseProperty. The Binding work well. I can see the items. But something wrong. the event 'PropertyChanged' always null. Can anyone help? Thanks in advance! class ObservableDictionary<TKey, TValue>:Dictionary<TKey, TValue>, INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; public new void Remove(TKey obj) { base.Remove(obj); if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs("Remove")); } } }

    Read the article

  • Wpf stop routing event when MessageBox appear?

    - by yossharel
    Hi all, I've PreviewMouseDown event on TreeView in order to determine if user can select other item based on some logic. If the current item data changed, will appear MessageBox that asks the user if he want to discard the changes. if user press YES , I set e.Handled = false; to enable the new selection. and if user press NO, I set e.Handled = true; to cancel the new selection. The problem is that although I set e.Handled = false , the event stop and no selection event occurs on TreeView. Someone has solution for that? Thanks in advance!

    Read the article

1