private static void OnIsSelectedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            UserAccountButton button = (d as UserAccountButton);

            if (button.IsSelected)
            {
                button.Background = (Application.Current.Resources["SystemControlBackgroundAccentBrush"] as SolidColorBrush);
            }
            else
            {
                button.Background = new SolidColorBrush(Windows.UI.Color.FromArgb(0, 255, 255, 255));
            }
        }
        private static void OnUsernamePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            UserAccountButton button = (d as UserAccountButton);

            if (button.IsLoggedIn)
            {
                button.LoginLogoutMenuFlyoutItem.Text = "Logout";
            }
            else
            {
                button.LoginLogoutMenuFlyoutItem.Text = "Login";
            }
        }
        private static void OnAvatarPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            UserAccountButton button = (d as UserAccountButton);

            button.avatarImage.Source = new BitmapImage(button.Avatar);
        }