Exemple #1
0
 // Handles context menu events
 public void tUpdate(SpecialBox item, EventArgs e)
 {
     if (TextClick != null)
     {
         TextClick(this, item);
     }
 }
Exemple #2
0
        // This constructor takes in a string for the header and creates a new tab with the identified header
        public MyTabItem(String s)
        {
            // Build context menu for right click
            ContextMenu cm = createContextMenu();

            // Create header of tab
            Header = s;

            // Create a RichTextBox for editing text
            Content             = new SpecialBox();
            Content.ContextMenu = cm;
            //SolidColorBrush b = (SolidColorBrush)(new BrushConverter().ConvertFrom("#6da03c"));
            Content.BorderThickness = new Thickness(0);
            Content.Margin          = new Thickness(10);
            //Content.BorderBrush = b;

            // Allows hyperlinks to function
            Content.IsDocumentEnabled = true;

            Content.MouseDown += (sendingelement, eventargs) => tUpdate(Content, eventargs);
        }