Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public PinnedContextMenu()
     : base()
 {
     _unpinMenu = new RadContextMenuItem();
     _unpinMenu.Content = UNPIN;
     _unpinMenu.Tap += UnpinMenu_Tap;
 }
Exemplo n.º 3
0
 public PinnedContextMenu()
     : base()
 {
     _unpinMenu         = new RadContextMenuItem();
     _unpinMenu.Content = UNPIN;
     _unpinMenu.Tap    += UnpinMenu_Tap;
 }
Exemplo n.º 4
0
        public ForumContextMenu()
            : base()
        {
            _togglePinned = new RadContextMenuItem();
            _togglePinned.Tap += TogglePinned_Tap;

            this.Items.Add(_togglePinned);
            this.Opening += ForumContextMenu_Opening;
        }
Exemplo n.º 5
0
 private RadContextMenu CreateImageMenu(RadContextMenu radContextMenu)
 {
     openInBrowser = new RadContextMenuItem()
     {
         Content = "open in web browser", Command = _webCommand
     };
     radContextMenu.Items.Add(openInBrowser);
     return(radContextMenu);
 }
Exemplo n.º 6
0
        public ForumContextMenu()
            : base()
        {
            _togglePinned      = new RadContextMenuItem();
            _togglePinned.Tap += TogglePinned_Tap;

            this.Items.Add(_togglePinned);
            this.Opening += ForumContextMenu_Opening;
        }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
0
        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;
        }
Exemplo n.º 11
0
        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;
        }
Exemplo n.º 12
0
 private RadContextMenu CreateImageMenu(RadContextMenu radContextMenu)
 {
     openInBrowser = new RadContextMenuItem() { Content = "open in web browser", Command = _webCommand };
     radContextMenu.Items.Add(openInBrowser);
     return radContextMenu;
 }
Exemplo n.º 13
0
        /// <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);
        }