private RadContextMenu ConfigurePostMenu(RadContextMenu postMenu) { var quote = new Commands.QuotePostToClipboardCommand(); var edit = new Commands.EditPostCommand(); var mark = new Commands.MarkPostAsReadCommand(); quoteMenu = new RadContextMenuItem() { Content = "quote", Command = quote }; editMenu = new RadContextMenuItem() { Content = "edit", Command = edit }; markMenu = new RadContextMenuItem() { Content = "mark as read", Command = mark }; postMenu.Items.Add(editMenu); postMenu.Items.Add(quoteMenu); postMenu.Items.Add(markMenu); postMenu.IsFadeEnabled = false; postMenu.IsZoomEnabled = false; return(postMenu); }
public PinnedContextMenu() : base() { _unpinMenu = new RadContextMenuItem(); _unpinMenu.Content = UNPIN; _unpinMenu.Tap += UnpinMenu_Tap; }
public ForumContextMenu() : base() { _togglePinned = new RadContextMenuItem(); _togglePinned.Tap += TogglePinned_Tap; this.Items.Add(_togglePinned); this.Opening += ForumContextMenu_Opening; }
private RadContextMenu CreateImageMenu(RadContextMenu radContextMenu) { openInBrowser = new RadContextMenuItem() { Content = "open in web browser", Command = _webCommand }; radContextMenu.Items.Add(openInBrowser); return(radContextMenu); }
public ThreadContextMenu() { this._toggleBookmarks = new RadContextMenuItem(); this._toggleBookmarks.Command = new Commands.ToggleBookmarkCommand(); this._jumpToPage = new RadContextMenuItem(); this._jumpToPage.Content = JUMP; this._jumpToPage.Tapped += new EventHandler <ContextMenuItemSelectedEventArgs>(OnJumpToPageTapped); this._clearMarkedPosts = new RadContextMenuItem(); this._clearMarkedPosts.Command = new Commands.ClearMarkedPostsCommand(); this._clearMarkedPosts.Content = CLEAR; this.Items.Add(_toggleBookmarks); this.Items.Add(_jumpToPage); this.Items.Add(_clearMarkedPosts); this.Opening += new EventHandler <ContextMenuOpeningEventArgs>(OnMenuOpening); }
private RadContextMenu CreateLinkMenu(RadContextMenu radContextMenu) { var saCommand = new Commands.ViewSAThreadCommand(); var webCommand = _webCommand; viewOnSA = new RadContextMenuItem() { Content = "open in Awful!", Command = saCommand }; viewOnWeb = new RadContextMenuItem() { Content = "open in web browser", Command = webCommand }; radContextMenu.Items.Add(viewOnSA); radContextMenu.Items.Add(viewOnWeb); return(radContextMenu); }
public ThreadContextMenu() { this._toggleBookmarks = new RadContextMenuItem(); this._toggleBookmarks.Command = new Commands.ToggleBookmarkCommand(); this._jumpToPage = new RadContextMenuItem(); this._jumpToPage.Content = JUMP; this._jumpToPage.Tapped += new EventHandler<ContextMenuItemSelectedEventArgs>(OnJumpToPageTapped); this._clearMarkedPosts = new RadContextMenuItem(); this._clearMarkedPosts.Command = new Commands.ClearMarkedPostsCommand(); this._clearMarkedPosts.Content = CLEAR; this.Items.Add(_toggleBookmarks); this.Items.Add(_jumpToPage); this.Items.Add(_clearMarkedPosts); this.Opening += new EventHandler<ContextMenuOpeningEventArgs>(OnMenuOpening); }
private RadContextMenu ConfigurePostMenu(RadContextMenu postMenu) { var quote = new Commands.QuotePostToClipboardCommand(); var edit = new Commands.EditPostCommand(); var mark = new Commands.MarkPostAsReadCommand(); quoteMenu = new RadContextMenuItem() { Content = "quote", Command = quote }; editMenu = new RadContextMenuItem() { Content = "edit", Command = edit }; markMenu = new RadContextMenuItem() { Content = "mark as read", Command = mark }; postMenu.Items.Add(editMenu); postMenu.Items.Add(quoteMenu); postMenu.Items.Add(markMenu); postMenu.IsFadeEnabled = false; postMenu.IsZoomEnabled = false; return postMenu; }
private RadContextMenu CreateLinkMenu(RadContextMenu radContextMenu) { var saCommand = new Commands.ViewSAThreadCommand(); var webCommand = _webCommand; viewOnSA = new RadContextMenuItem() { Content = "open in Awful!", Command = saCommand }; viewOnWeb = new RadContextMenuItem() { Content = "open in web browser", Command = webCommand }; radContextMenu.Items.Add(viewOnSA); radContextMenu.Items.Add(viewOnWeb); return radContextMenu; }
private RadContextMenu CreateImageMenu(RadContextMenu radContextMenu) { openInBrowser = new RadContextMenuItem() { Content = "open in web browser", Command = _webCommand }; radContextMenu.Items.Add(openInBrowser); return radContextMenu; }
/// <summary> /// Add a new selected value /// </summary> private void AddValueButton(string text) { //Create an item button Button button = new Button(); button.Style = ValueButtonStyle; button.Content = text; RadContextMenu menu = new RadContextMenu(); menu.IsZoomEnabled = false; RadContextMenu.SetContextMenu(button, menu); RadContextMenuItem miRemove = new RadContextMenuItem() { Content = "Remove" }; menu.Items.Add(miRemove); RadContextMenuItem miEdit = new RadContextMenuItem() { Content = "Edit" }; menu.Items.Add(miEdit); menu.ItemTapped += (s, e) => { if (e.VisualContainer == miEdit) { textBox.Text = (string)button.Content; textBox.Focus(); } wrapPanel.Children.Remove(button); }; button.Tap += (s, e) => { menu.IsOpen = true; e.Handled = true; }; //Insert before the TextBox wrapPanel.Children.Insert(wrapPanel.Children.Count - 1, button); }