Example #1
0
        /// <summary>
        /// Method used to add elements to the Document Container.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AddElement_Click(object sender, RoutedEventArgs e)
        {
            RichTextBox rtb = new RichTextBox();

            rtb.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            DocumentContainer.SetHeader(rtb, "New Window" + i.ToString());
            Rect re = new Rect(30, 30, 300, 300);

            DocumentContainer.SetMDIBounds(rtb, re);
            DocContainer.Items.Add(rtb);
            DocContainer.ActiveDocument = rtb;
            i++;
        }