Click here to Skip to main content
14,355,045 members

Silverlight / WPF

 
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 
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 
You know, I read that and my mind glossed right over it.

So I now have:
<TextBlock Text="{Binding Source={x:Static local:AppCore.CurrentUser}, Path=FullName, Mode=TwoWay}"/>

and in AppCore:
public static class AppCore
{
    public static event EventHandler CurrentUserChanged;

    public static UserEntity CurrentUser { get; private set; }

    public static bool Login(CredentialEntity credentials)
    {
        var loggedIn = false;

        LoginResponse response = _appSecurity.Login(credentials);

        if (response.Result == Result.Success)
        {
            CurrentUser = response.User;
            CurrentUserChanged?.Invoke(null, EventArgs.Empty);
            loggedIn = true;
        }

        return loggedIn;
    }

}

when I log in, the Full name doesn't appear in the UI. Output Windows doesn't reveal anything.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

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 
AnswerRe: UserControl Pin
Jon McKee5-Dec-16 12:12
professionalJon McKee5-Dec-16 12:12 
GeneralRe: UserControl Pin
Kevin Marois5-Dec-16 12:22
professionalKevin Marois5-Dec-16 12:22 
GeneralRe: UserControl Pin
Jon McKee5-Dec-16 12:40
professionalJon McKee5-Dec-16 12:40 
GeneralRe: UserControl Pin
Kevin Marois5-Dec-16 12:46
professionalKevin Marois5-Dec-16 12:46 

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.