Click here to Skip to main content
       

Silverlight / WPF

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: Not able to drag and drop WPF controls on to window in Visual Studio 2008memberanurag34875 Jun '12 - 2:56 
QuestionSilverlight client 4.0 application listboxs not working with the new Sliverlight 5.1 clientmemberSteve Holdorf3 Jun '12 - 12:21 
AnswerRe: Silverlight client 4.0 application listboxs not working with the new Sliverlight 5.1 clientmembervinodkrebc7 Jun '12 - 0:04 
QuestionWhich platform for a simple platform game to play by web rend erer ?memberEternallyConfuzzled31 May '12 - 22:28 
AnswerRe: Which platform for a simple platform game to play by web rend erer ?mvpAbhinav S3 Jun '12 - 19:33 
QuestionComboBox MVVM Issuememberwasimsharp31 May '12 - 21:29 
AnswerRe: ComboBox MVVM IssuememberAlisaunder2 Jun '12 - 6:24 
QuestionWPF TreeView jumps upmemberMc_Topaz30 May '12 - 1:09 
AnswerRe: WPF TreeView jumps upmemberGerry Schmitz30 May '12 - 8:21 
QuestionSet webcam brightness in Silverlightmemberebrahim rajabloo29 May '12 - 19:28 
QuestionINotifyPropertyChanged on Interface class property?memberUCLAdam29 May '12 - 1:02 
AnswerRe: INotifyPropertyChanged on Interface class property?protectorPete O'Hanlon29 May '12 - 2:26 
GeneralRe: INotifyPropertyChanged on Interface class property? [modified]memberUCLAdam29 May '12 - 2:35 
Hi Pete
 
In my ViewModelBase I have an instance of the interface, called MyService.
 
So then in my actual ViewModel I have the property, ErrorStatus which is what I am binding to in XAML:
        private ErrorStatus _errorStatus;
        public ErrorStatus ErrorStatus
        {
            get { return _errorStatus; }
            set
            {
                if (_errorStatus != value)
                {
                    _errorStatus = value;
                    RaisePropertyChanged("ErrorStatus");
                }
            }
        }
 
I am also creating an event handler in my viewmodel for property changes in the interface.
 
MyService.PropertyChanged += MyService_PropertyChanged;
 
private void MyService_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
            switch (e.PropertyName)
            {
                case "ServiceStatus":
                    ErrorStatus = MyService.ServiceStatus;
                    break;
            }
}
 
Would this be the correct approach or should I just create a public property for the viewmodelbase interface instance and bind to the properties through that?

modified 29 May '12 - 8:52.

GeneralRe: INotifyPropertyChanged on Interface class property?protectorPete O'Hanlon29 May '12 - 2:49 
GeneralRe: INotifyPropertyChanged on Interface class property?memberUCLAdam29 May '12 - 2:51 
GeneralRe: INotifyPropertyChanged on Interface class property?protectorPete O'Hanlon29 May '12 - 3:10 
GeneralRe: INotifyPropertyChanged on Interface class property?memberUCLAdam29 May '12 - 3:21 
GeneralRe: INotifyPropertyChanged on Interface class property?protectorPete O'Hanlon29 May '12 - 3:30 
GeneralRe: INotifyPropertyChanged on Interface class property?memberUCLAdam29 May '12 - 3:46 
GeneralRe: INotifyPropertyChanged on Interface class property?protectorPete O'Hanlon29 May '12 - 4:00 
GeneralRe: INotifyPropertyChanged on Interface class property?memberUCLAdam29 May '12 - 4:22 
GeneralRe: INotifyPropertyChanged on Interface class property?protectorPete O'Hanlon29 May '12 - 22:03 
GeneralRe: INotifyPropertyChanged on Interface class property?memberUCLAdam29 May '12 - 22:10 
GeneralRe: INotifyPropertyChanged on Interface class property?protectorPete O'Hanlon29 May '12 - 22:43 
GeneralRe: INotifyPropertyChanged on Interface class property?memberUCLAdam30 May '12 - 0:51 
GeneralRe: INotifyPropertyChanged on Interface class property?protectorPete O'Hanlon30 May '12 - 1:17 
Questionthe wpf added winform controlsmemberdengzn28 May '12 - 22:43 
AnswerRe: the wpf added winform controlsprotectorPete O'Hanlon28 May '12 - 23:01 
AnswerRe: the wpf added winform controls [modified]memberAmardeep Deshmukh29 May '12 - 0:36 
QuestionDirectshow in silverlightmemberebrahim rajabloo28 May '12 - 3:16 
AnswerRe: Directshow in silverlightmvpAbhinav S28 May '12 - 4:23 
GeneralRe: Directshow in silverlightmemberebrahim rajabloo28 May '12 - 17:41 
GeneralRe: Directshow in silverlightprotectorPete O'Hanlon28 May '12 - 20:18 
QuestionOperation could destabilize the runtime!!!memberebrahim rajabloo26 May '12 - 22:19 
QuestionWPF HierarchicalDataTemplate Questions:memberKevin Marois24 May '12 - 14:21 
AnswerRe: WPF HierarchicalDataTemplate Questions:memberAmardeep Deshmukh25 May '12 - 2:18 
AnswerRe: WPF HierarchicalDataTemplate Questions:memberAmardeep Deshmukh25 May '12 - 7:33 
GeneralRe: WPF HierarchicalDataTemplate Questions:memberKevin Marois29 May '12 - 13:08 
GeneralRe: WPF HierarchicalDataTemplate Questions:memberAmardeep Deshmukh29 May '12 - 18:55 
GeneralRe: WPF HierarchicalDataTemplate Questions:protectorPete O'Hanlon29 May '12 - 22:27 
QuestionHow to get to the top in wpf datagrid blank row?membercengiz02624 May '12 - 10:19 
AnswerRe: How to get to the top in wpf datagrid blank row?memberMycroft Holmes24 May '12 - 12:43 
QuestionCS6 Subscription and Creative CloudmemberMark Walter Smith24 May '12 - 8:59 
AnswerRe: CS6 Subscription and Creative CloudprotectorPete O'Hanlon24 May '12 - 9:15 
QuestionLocalization in SilverlightmemberShirish kumar manda23 May '12 - 0:46 
AnswerRe: Localization in SilverlightmvpAbhinav S23 May '12 - 3:39 
Questionconvert byte to imagememberheba abu ghaleih2222 May '12 - 23:40 
QuestionSilverlight 5memberMycroft Holmes22 May '12 - 22:29 
AnswerRe: Silverlight 5mvpAbhinav S23 May '12 - 3:42 
GeneralRe: Silverlight 5memberMycroft Holmes23 May '12 - 13:05 

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


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 23 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid