public void DoInlinePastedText(PasteInlineReplyPayload pastedReply)
 {
     if (pastedReply.id == Tweet.ID)
     {
         DoInlineReply(pastedReply.Text);
     }
 }
        private void contextMenuItem_StandardCCP(object sender, RoutedEventArgs e)
        {
            var mif = e.Source as MenuItem;
            if (mif == null) return;

            string commandchosen = mif.Name; // get the name of the chosen contextual menu, used as key into scripts
            var ewf = Keyboard.FocusedElement as UIElement; // this retrieves the current textbox that has selection
            if (!(ewf is StatusUpdateTextbox)) return;

            var tbwf = ewf as RichTextBox;
            switch (commandchosen)
            {
                case "Copy":
                    tbwf.Copy();
                    break;
                case "Paste":
                    if (Clipboard.ContainsText())
                    {
                        var text = Clipboard.GetData(DataFormats.Text) as string;
                        var eventAggregator = CompositionManager.Get<IEventAggregator>();
                        var pasteInline = new PasteInlineReplyPayload(text, StatusUpdate.ID);
                        eventAggregator.GetEvent<PasteInlineReply>().Publish(pasteInline);
                    }
                    break;
            }
        }