This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm just getting started on a long over due project and need a little bit of help. What I want is to have the PhoneNumber completely show up on one line and then expand to show Area Code, Contry Code, Number on separate lines (Just like your sample). I've converted most of the C# code but I'm having a bit of a problem with the Set statement set { Set(ref _homePhone, value, "HomePhone");If I make it a standard homePhone= value then everything show up on the separate lines but not combinded. Thanks
|
|
|
All that the Set method is doing is centralising the raising of the PropertyChanged event. The simple setter no longer raises PropertyChanged so WPF does not know that it needs to refresh the property where it is displayed in other places. So one option is to call OnPropertyChanged or otherwise raise PropertyChanged directly from your setter. However we would recommend that you stick with the Set method approach, because this also does some handy equality checking. To call Set from VB you just need to write [Set](_homePhone, value, "HomePhone"). Note the square brackets around Set which tell VB to treat this as a method name rather than the VB Set keyword. |
|