示例#1
0
 /// <summary>
 /// As an extension, information of the core and the control needs to be present in all extensions, therefore
 /// it is a protected base class member
 /// </summary>
 /// <param name="editor"> TextEditorControl object </param>
 /// <param name="core"> TextCore Singleton object </param>
 public void SetEditorCore(TextEditorControl editor, ITextEditorCore core)
 {
     textEditorControl = editor;
     textCore          = core;
     textEditorCanvas  = textEditorControl.FindName("textCanvas") as TextEditorCanvas;
     scrollViewer      = textEditorControl.FindName("scrollViewer") as ScrollViewer;
 }
示例#2
0
        internal void Initialize(TextEditorControl textEditorControl)
        {
            this.mainEditorGrid = textEditorControl.FindName("grid") as Grid;
            this.mainSplitter   = textEditorControl.FindName("MainGridSplitter") as GridSplitter;

            // If you get this assertion, then the "grid" element in XAML has
            // been modified. Which means the following codes that expect a
            // particular grid layout, need changing too. Look for all parts
            // in this file with GRIDLAYOUTSPECIFIC tag and update their logic!
            //
            System.Diagnostics.Debug.Assert(mainEditorGrid.RowDefinitions.Count == 7);
            System.Diagnostics.Debug.Assert(mainEditorGrid.RowDefinitions[3].Height.IsStar);
            mainEditorGrid.RowDefinitions[5].Height = new GridLength(0.0);
            mainSplitter.Visibility = Visibility.Collapsed;
        }
        internal void Initialize(TextEditorControl textEditorControl)
        {
            this.mainEditorGrid = textEditorControl.FindName("grid") as Grid;
            this.mainSplitter = textEditorControl.FindName("MainGridSplitter") as GridSplitter;

            // If you get this assertion, then the "grid" element in XAML has
            // been modified. Which means the following codes that expect a
            // particular grid layout, need changing too. Look for all parts
            // in this file with GRIDLAYOUTSPECIFIC tag and update their logic!
            //
            System.Diagnostics.Debug.Assert(mainEditorGrid.RowDefinitions.Count == 7);
            System.Diagnostics.Debug.Assert(mainEditorGrid.RowDefinitions[3].Height.IsStar);
            mainEditorGrid.RowDefinitions[5].Height = new GridLength(0.0);
            mainSplitter.Visibility = Visibility.Collapsed;
        }
示例#4
0
 /// <summary>
 /// As an extension, information of the core and the control needs to be present in all extensions, therefore
 /// it is a protected base class member
 /// </summary>
 /// <param name="editor"> TextEditorControl object </param>
 /// <param name="core"> TextCore Singleton object </param>
 public void SetEditorCore(TextEditorControl editor, ITextEditorCore core)
 {
     textEditorControl = editor;
     textCore = core;
     textEditorCanvas = textEditorControl.FindName("textCanvas") as TextEditorCanvas;
     scrollViewer = textEditorControl.FindName("scrollViewer") as ScrollViewer;
 }