Click here to Skip to main content
14,364,487 members

Silverlight / WPF

 
GeneralRe: c# WPF MVVM accesing a view with from another view Pin
Member 1288059516-Jan-17 9:05
memberMember 1288059516-Jan-17 9:05 
AnswerRe: c# WPF MVVM accesing a view with from another view Pin
Richard Deeming16-Jan-17 3:26
mveRichard Deeming16-Jan-17 3:26 
GeneralRe: c# WPF MVVM accesing a view with from another view Pin
Member 1288059516-Jan-17 9:31
memberMember 1288059516-Jan-17 9:31 
GeneralRe: c# WPF MVVM accesing a view with from another view Pin
Richard Deeming16-Jan-17 10:12
mveRichard Deeming16-Jan-17 10:12 
GeneralRe: c# WPF MVVM accesing a view with from another view Pin
Member 1288059517-Jan-17 9:05
memberMember 1288059517-Jan-17 9:05 
GeneralRe: c# WPF MVVM accesing a view with from another view Pin
Richard Deeming17-Jan-17 9:40
mveRichard Deeming17-Jan-17 9:40 
GeneralRe: c# WPF MVVM accesing a view with from another view Pin
Member 1288059517-Jan-17 9:52
memberMember 1288059517-Jan-17 9:52 
QuestionBind To Static Property Pin
Kevin Marois13-Jan-17 6:32
professionalKevin Marois13-Jan-17 6:32 
I have a static class called AppCore. It contains a reference to the currently logged in user:
public static class AppCore
{
    public static UserEntity CurrentUser { get; private set; }

    public static void Login()
    {
       // ... log in the user and set CurrentUser 
    }
}

I want to to display the CurrentUser.FullName on the main widnow:
<TextBlock Text="{Binding Source={x:Static local:AppCore.CurrentUser}, Path=FullName, Mode=TwoWay}"/>

When I log in, I don't see the user's name. I suspect its because I can't implemenet I NotifyPropertyChanged in a static class.

Is there a way to do this that I'm not seeing?

Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Bind To Static Property Pin
Richard Deeming13-Jan-17 6:55
mveRichard Deeming13-Jan-17 6:55 
GeneralRe: Bind To Static Property Pin
Kevin Marois13-Jan-17 7:01
professionalKevin Marois13-Jan-17 7:01 
GeneralRe: Bind To Static Property Pin
Richard Deeming13-Jan-17 8:49
mveRichard Deeming13-Jan-17 8:49 
GeneralRe: Bind To Static Property Pin
Kevin Marois13-Jan-17 8:56
professionalKevin Marois13-Jan-17 8:56 
GeneralRe: Bind To Static Property Pin
Richard Deeming13-Jan-17 9:18
mveRichard Deeming13-Jan-17 9:18 
GeneralRe: Bind To Static Property Pin
Kevin Marois13-Jan-17 9:23
professionalKevin Marois13-Jan-17 9:23 
GeneralRe: Bind To Static Property Pin
Richard Deeming13-Jan-17 9:24
mveRichard Deeming13-Jan-17 9:24 
GeneralRe: Bind To Static Property Pin
Kevin Marois13-Jan-17 9:25
professionalKevin Marois13-Jan-17 9:25 
GeneralRe: Bind To Static Property Pin
Richard Deeming13-Jan-17 9:29
mveRichard Deeming13-Jan-17 9:29 
GeneralRe: Bind To Static Property Pin
Kevin Marois13-Jan-17 9:31
professionalKevin Marois13-Jan-17 9:31 
QuestionWPF/MVVM - How To Make A Chess Board Pin
Kevin Marois20-Dec-16 7:13
professionalKevin Marois20-Dec-16 7:13 
AnswerRe: WPF/MVVM - How To Make A Chess Board Pin
Meshack Musundi26-Dec-16 20:26
professionalMeshack Musundi26-Dec-16 20:26 
QuestionMetroTabItem View Going out of Scope Pin
JPKI13-Dec-16 13:59
memberJPKI13-Dec-16 13:59 
AnswerRe: MetroTabItem View Going out of Scope Pin
Pete O'Hanlon13-Dec-16 21:50
protectorPete O'Hanlon13-Dec-16 21:50 
GeneralRe: MetroTabItem View Going out of Scope Pin
JPKI13-Dec-16 23:14
memberJPKI13-Dec-16 23:14 
GeneralRe: MetroTabItem View Going out of Scope Pin
JPKI15-Dec-16 9:33
memberJPKI15-Dec-16 9:33 
QuestionUserControl Pin
Kevin Marois5-Dec-16 12:02
professionalKevin Marois5-Dec-16 12:02 

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.