예제 #1
0
 private static void ExpandEditorsAndHidePreview(HtmlEditor editor)
 {
     editor.SetPreviewText("");
     editor.Height = editor.lastHeigth;
     editor.EditorsGrid.Visibility = Visibility.Visible;
     editor.PreviewPanel.Visibility = Visibility.Collapsed;
 }
예제 #2
0
 private static void CollapseEditorsAndShowPreview(HtmlEditor editor)
 {
     // store height for the moment when to expand
     editor.lastHeigth = editor.Height;
     editor.lastWidth = editor.ActualWidth;
     // set new height
     editor.Height = editor.Height - (editor.EditorsGrid.Height - editor.PreviewPanel.ActualHeight);
     // hide - show what needed in this case
     editor.EditorsGrid.Visibility = Visibility.Collapsed;
     editor.PreviewPanel.Visibility = Visibility.Visible;
     // set text - not too much
     editor.SetPreviewText(editor.ContentText);
 }