Click here to Skip to main content
       

Silverlight / WPF

 
GeneralRe: Byte[] of PDF into image PinmemberGomathiR10-Oct-12 4:22 
QuestionSL application tha treads local registries Pinmemberpicasso25-Oct-12 18:51 
AnswerRe: SL application tha treads local registries PinmvpRichard MacCutchan5-Oct-12 22:37 
QuestionHow to dynamically load Theme in Application? PinmemberSavalia Manoj M4-Oct-12 1:27 
AnswerRe: How to dynamically load Theme in Application? PinprotectorPete O'Hanlon4-Oct-12 1:55 
AnswerRe: How to dynamically load Theme in Application? PinmemberShrinivas Ramesh Ambat17-Oct-12 2:38 
GeneralRe: How to dynamically load Theme in Application? PinprotectorPete O'Hanlon17-Oct-12 3:07 
GeneralRe: How to dynamically load Theme in Application? PinmentorWayne Gaylard17-Oct-12 3:10 
QuestionProblem in flow direction when value is right to left in Telerik PinmemberHossein Khalaj3-Oct-12 20:19 
AnswerRe: Problem in flow direction when value is right to left in Telerik PinprotectorPete O'Hanlon3-Oct-12 20:21 
GeneralRe: Problem in flow direction when value is right to left in Telerik PinmemberHossein Khalaj3-Oct-12 20:23 
GeneralRe: Problem in flow direction when value is right to left in Telerik PinmemberHossein Khalaj4-Oct-12 22:48 
Questionbinding: not work property Mode=TwoWay and UpdateSourceTrigger PinmemberdominioYP3-Oct-12 0:25 
AnswerRe: binding: not work property Mode=TwoWay and UpdateSourceTrigger PinprotectorPete O'Hanlon3-Oct-12 0:54 
The item you are editing has to notify WPF that it has changed. Just because you have an ObservableCollection, it doesn't mean that your application will be able to respond to changed inside the items that make up the collection. To enable this, you need so expose those items to the binding mechanism as well - fortunately, this is incredibly easy to do.
 
Change your ListBoxData class so that it (or an ancestor that you choose) implements INotifyPropertyChanged. Then, add the ability to raise a change when nome changes. For example:
public class ListBoxData : INotifyPropertyChanged
{
  public event PropertyChangedEventHandler PropertyChanged;
  private string _nome;
 
  public string nome 
  {
    get { return _nome; }
    set
    {
      if (_nome != value)
      {
        _nome = value;
        OnChanged("nome");
      }
    }
  }
 
  private void OnChanged(string propertyName)
  {
    PropertyChangedEventHandler handler = PropertyChanged;
    if (handler != null)
    {
      handler(this, new PropertyChangedEventArgs(propertyName));
    }
  }
}
Now, whenever you change nome, the PropertyChanged event is raised - and the WPF binding mechanism knows how to handle that. Changes will be reflected in the UI now.

*pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

"Mind bleach! Send me mind bleach!" - Nagy Vilmos

CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

GeneralRe: binding: not work property Mode=TwoWay and UpdateSourceTrigger PinmemberdominioYP3-Oct-12 22:24 
QuestionHow do I reference embedded resources in Xaml? PinmemberGil Yoder2-Oct-12 18:57 
AnswerRe: How do I reference embedded resources in Xaml? PinmemberGil Yoder4-Oct-12 7:52 
Questionsilverlight Pinmemberrameshchetu30-Sep-12 9:12 
AnswerRe: silverlight PinprotectorPete O'Hanlon30-Sep-12 9:45 
AnswerRe: silverlight PinmemberKenneth Haugland30-Sep-12 22:36 
AnswerRe: silverlight PinmvpAbhinav S3-Oct-12 20:40 
QuestionCheckk For WCF Service Running & Exit PinmemberKevin Marois29-Sep-12 9:51 
QuestionSendMessage in C# WPF PinmemberdominioYP28-Sep-12 6:11 
AnswerRe: SendMessage in C# WPF PinprotectorPete O'Hanlon29-Sep-12 10:30 
GeneralRe: SendMessage in C# WPF PinmemberdominioYP29-Sep-12 12:08 
GeneralRe: SendMessage in C# WPF PinprotectorPete O'Hanlon29-Sep-12 20:45 
QuestionNew to .net/ previous programming background Pinmemberljv_az27-Sep-12 8:29 
AnswerRe: New to .net/ previous programming background PinmvpRichard MacCutchan27-Sep-12 9:47 
GeneralRe: New to .net/ previous programming background Pinmemberljv_az27-Sep-12 10:00 
GeneralRe: New to .net/ previous programming background PinmvpRichard MacCutchan27-Sep-12 21:16 
GeneralRe: New to .net/ previous programming background Pinmemberljv_az28-Sep-12 8:14 
GeneralRe: New to .net/ previous programming background PinmvpRichard MacCutchan28-Sep-12 21:57 
GeneralRe: New to .net/ previous programming background Pinmemberljv_az29-Sep-12 7:29 
GeneralRe: New to .net/ previous programming background PinmvpRichard MacCutchan29-Sep-12 7:34 
GeneralRe: New to .net/ previous programming background Pinmemberljv_az29-Sep-12 16:46 
GeneralRe: New to .net/ previous programming background PinmvpRichard MacCutchan29-Sep-12 21:38 
GeneralRe: New to .net/ previous programming background Pinmemberljv_az30-Sep-12 6:23 
GeneralRe: New to .net/ previous programming background PinmvpRichard MacCutchan30-Sep-12 6:59 
GeneralRe: New to .net/ previous programming background Pinmemberljv_az30-Sep-12 7:51 
GeneralRe: New to .net/ previous programming background PinmvpRichard MacCutchan30-Sep-12 21:57 
AnswerRe: New to .net/ previous programming background PinprotectorPete O'Hanlon30-Sep-12 7:48 
AnswerRe: New to .net/ previous programming background PinmemberBlikkies2-Oct-12 5:04 
GeneralRe: New to .net/ previous programming background PinmemberAlisaunder3-Oct-12 17:10 
AnswerRe: New to .net/ previous programming background Pinmember_Maxxx_7-Oct-12 17:17 
QuestionJesús Alvarez Manrique PinmemberMember 901299827-Sep-12 6:47 
AnswerRe: Jesús Alvarez Manrique PinmemberYayozama27-Sep-12 7:37 
GeneralRe: Jesús Alvarez Manrique PinmemberMember 901299827-Sep-12 7:57 
GeneralRe: Jesús Alvarez Manrique PinmemberEmmanuel Medina Lopez27-Sep-12 11:33 
GeneralRe: Jesús Alvarez Manrique PinmemberMember 901299827-Sep-12 7:59 
QuestionBobbles in paradise - ViewModel and my personal adventures in WTF PinmemberKenneth Haugland26-Sep-12 18:25 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 1 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid