Ejemplo n.º 1
0
        private void ShowPollResponsesButton_Click(object sender, EventArgs e)
        {
            Button       button  = sender as Button;
            MessageModel message = ((MessageModel)button.DataContext);

            if (message != null)
            {
                this.PopupChatBubble.DataContext         = message;
                this.PopupChatBubble.ChatBubbleDirection = (ChatBubbleDirection)((BooleanToChatPropertyConverter)App.Current.Resources["booleanToChatPropertyConverter"]).Convert(message.IsMine, typeof(ChatBubbleDirection), "direction", "en-US");
                this.PopupChatBubble.Background          = (SolidColorBrush)((BooleanToChatPropertyConverter)App.Current.Resources["booleanToChatPropertyConverter"]).Convert(message.IsMine, typeof(SolidColorBrush), "background", "en-US");
                this.PopupChatBubble.BorderBrush         = this.PopupChatBubble.Background;
                this.PollResponsesStack.Visibility       = System.Windows.Visibility.Visible;
                this.PollResponsesPopup.Visibility       = Visibility.Visible;
                this.PollResponsesPopup.IsOpen           = true;
                this.PollResponsesSelector.ItemsSource   = message.GetGroupedPollResponses();

                this.ApplicationBar = (ApplicationBar)this.Resources["PollResponsesAppBar"];
            }
        }