当前位置: 首页>>代码示例>>C#>>正文


C# DocumentContent.Show方法代码示例

本文整理汇总了C#中AvalonDock.DocumentContent.Show方法的典型用法代码示例。如果您正苦于以下问题:C# DocumentContent.Show方法的具体用法?C# DocumentContent.Show怎么用?C# DocumentContent.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AvalonDock.DocumentContent的用法示例。


在下文中一共展示了DocumentContent.Show方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NewEditor

 public IEditor NewEditor()
 {
     DocumentContent document = new DocumentContent();
     Editor editor = new Editor(document);
     document.Show(manager);
     document.Activate();
     return editor;
 }
开发者ID:conradz,项目名称:Edit5,代码行数:8,代码来源:EditorProvider.cs

示例2: CreateNewDocument

        private void CreateNewDocument(object sender, RoutedEventArgs e)
        {

            string baseDocTitle = "MyDocument";
            int i = 1;
            string title = baseDocTitle + i.ToString();

            while (dockManager.Documents.Any(d => d.Title == title))
            {
                i++;
                title = baseDocTitle + i.ToString();
            }

            DocumentContent doc = new DocumentContent() { Title = title };
            doc.Show(dockManager);

            //MyDocuments.Add(new DocumentContent() { Title = title });
        }
开发者ID:Reticulatas,项目名称:AvalonDock,代码行数:18,代码来源:MainWindow.xaml.cs

示例3: ShowDocument

 public static void ShowDocument(DocumentContent doc, bool floating)
 {
     doc.Show(DockingManager, floating);
     doc.Activate();
 }
开发者ID:HaKDMoDz,项目名称:Irelia,代码行数:5,代码来源:DocumentService.cs

示例4: InitGUITab

        /// <summary>
        /// Initialication of the GUIEditor Tab, creating the context menu for the GUIEditor elements
        /// </summary>
        private void InitGUITab()
        {
            // Context menu
            gUIComponentContextMenu = new ContextMenu();
            gUIComponentContextMenuResize = new MenuItem();
            gUIComponentContextMenuResize.Header = Properties.Resources.GUIEditorKeyboardResize;
            gUIComponentContextMenu.Items.Add(gUIComponentContextMenuResize);
            gUIComponentContextMenuResize.Click += gUIComponentContextMenuResize_Click;

            gUIComponentContextMenuResizeStop = new MenuItem();
            gUIComponentContextMenuResizeStop.Header = Properties.Resources.GUIEditorKeyboardResizeStop;
            gUIComponentContextMenuResizeStop.IsEnabled = false;
            gUIComponentContextMenu.Items.Add(gUIComponentContextMenuResizeStop);
            gUIComponentContextMenuResizeStop.Click += gUIComponentContextMenuResizeStop_Click;

            gUIComponentContextMenu.Items.Add(new Separator());
            gUIComponentContextMenuMove = new MenuItem();
            gUIComponentContextMenuMove.Header = Properties.Resources.GUIEditorKeyboardMove;
            gUIComponentContextMenu.Items.Add(gUIComponentContextMenuMove);
            gUIComponentContextMenuMove.Click += gUIComponentContextMenuMove_Click;

            gUIComponentContextMenuMoveStop = new MenuItem();
            gUIComponentContextMenuMoveStop.Header = Properties.Resources.GUIEditorKeyboardMoveStop;
            gUIComponentContextMenuMoveStop.IsEnabled = false;
            gUIComponentContextMenu.Items.Add(gUIComponentContextMenuMoveStop);
            gUIComponentContextMenuMoveStop.Click += gUIComponentContextMenuMoveStop_Click;

            // creating the tab fot the gui designer
            DockPanel guiDockPanel = new DockPanel();
            guiDockPanel.LastChildFill = true;

            guiScrollViewer = new ScrollViewer();
            guiScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            guiScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            guiDockPanel.Children.Add(guiScrollViewer);

            guiCanvas = new Canvas();
            InitGUICanvas();
            guiCanvasBorder = new Border();
            guiCanvasBorder.BorderThickness = new Thickness(2);
            guiCanvasBorder.BorderBrush = Brushes.DarkGray;
            guiCanvasBorder.Width = guiCanvas.Width + 4;
            guiCanvasBorder.Height = guiCanvas.Height + 4;
            guiCanvasBorder.Child = guiCanvas;
            guiScrollViewer.Content = guiCanvasBorder;
            GUIEditorCanvas = new DocumentContent() {
                Title = Properties.Resources.DockGUIWindow,
                Content = guiDockPanel,
                Name = "dockGUIEditorWindowName"
            };
            GUIEditorCanvas.IsCloseable = false;
            GUIEditorCanvas.IsActiveDocumentChanged += GUIEditorCanvas_IsActiveDocumentChanged;
            GUIEditorCanvas.Show(dockManager);

            guiProp = new GUIProperties();
            guiProp.PropertyChanged += guiProp_PropertyChanged;

            // Adapt screen resolution. Screen width is 800
            switch (guiProp.ScreenRes) {
                case GUIProperties.ScreenResolution.FiveFour:
                    guiCanvas.Height = GUIFRAMEHEIGHTFIVEFOUR;
                    break;
                case GUIProperties.ScreenResolution.FourThree:
                    guiCanvas.Height = GUIFRAMEHEIGHTFOURTHREE;
                    break;
                case GUIProperties.ScreenResolution.SixteenNine:
                    guiCanvas.Height = GUIFRAMEHEIGHTSIXTEENNINE;
                    break;
            }

            guiGridCanvas = new Canvas();
            guiGridCanvas.Width = guiCanvas.Width;
            guiGridCanvas.Height = guiCanvas.Height;
            DrawGridLines();
            guiCanvas.Children.Add(guiGridCanvas);
            if (guiProp.ShowGrid == true) {
                guiGridCanvas.Visibility = System.Windows.Visibility.Visible;
            }
            else {
                guiGridCanvas.Visibility = System.Windows.Visibility.Hidden;
            }

            AddAREGUIComponent();
        }
开发者ID:Walid-Shouman,项目名称:AsTeRICS,代码行数:87,代码来源:MainWindowGUIEditor.cs

示例5: BuildDockingLayout

        void BuildDockingLayout()
        {
            dockManager.Content = null;

            //TreeView dockable content
            var trv = new TreeView();
            trv.Items.Add(new TreeViewItem() { Header = "Item1" });
            trv.Items.Add(new TreeViewItem() { Header = "Item2" });
            trv.Items.Add(new TreeViewItem() { Header = "Item3" });
            trv.Items.Add(new TreeViewItem() { Header = "Item4" });
            ((TreeViewItem)trv.Items[0]).Items.Add(new TreeViewItem() { Header = "SubItem1" });
            ((TreeViewItem)trv.Items[0]).Items.Add(new TreeViewItem() { Header = "SubItem2" });
            ((TreeViewItem)trv.Items[1]).Items.Add(new TreeViewItem() { Header = "SubItem3" });
            ((TreeViewItem)trv.Items[2]).Items.Add(new TreeViewItem() { Header = "SubItem4" });
            var treeviewContent = new DockableContent() { Title = "Explorer", Content = trv };

            treeviewContent.Show(dockManager, AnchorStyle.Left);

            //TextBox invo dockable content
            var treeviewInfoContent = new DockableContent() { Title = "Explorer Info", Content = new TextBox() { Text = "Explorer Info Text", IsReadOnly = true } };
            treeviewContent.ContainerPane.Items.Add(treeviewInfoContent);


            //ListView dockable content
            var gridView = new GridView();
            gridView.Columns.Add(new GridViewColumn() { Header = "Date" });
            gridView.Columns.Add(new GridViewColumn() { Header = "Day Of Weeek", DisplayMemberBinding = new Binding("DayOfWeek") });
            gridView.Columns.Add(new GridViewColumn() { Header = "Year", DisplayMemberBinding = new Binding("Year") });
            gridView.Columns.Add(new GridViewColumn() { Header = "Month", DisplayMemberBinding = new Binding("Month") });
            gridView.Columns.Add(new GridViewColumn() { Header = "Second", DisplayMemberBinding = new Binding("Second") });
            var listView = new ListView() { View = gridView };
            listView.Items.Add(DateTime.Now);
            listView.Items.Add(DateTime.Now.AddYears(-1));
            listView.Items.Add(DateTime.Now.AddMonths(15));
            listView.Items.Add(DateTime.Now.AddHours(354));

            var listViewContent = new DockableContent() { Title = "Date & Times", Content = listView };
            listViewContent.ShowAsFloatingWindow(dockManager, true);

            //TextBox dockable content
            var textboxSampleContent = new DockableContent() { Title = "Date & Times Info", Content = new TextBox() { Text = "Date & Times Info Text", IsReadOnly = true } };
            listViewContent.ContainerPane.Items.Add(textboxSampleContent);


            //DataGrid document
            var dataGrid = new DataGrid();
            var rnd = new Random();
            var data = new List<Tuple<double, double, double, double>>();
            for (int i = 0; i < 100; i++)
            {
                data.Add(Tuple.Create(rnd.NextDouble(), rnd.NextDouble() * 10.0, rnd.NextDouble() * 100.0, rnd.NextDouble() * 1000.0));
            }

            dataGrid.ItemsSource = data;

            var dataGridDocument = new DocumentContent() { Title = "Data", IsLocked = true, Content = dataGrid };
            dataGridDocument.Show(dockManager);

            //DataGrid Info Text sample
            var dataGridInfoContent = new DockableContent() { Title = "Data Info", Content = new TextBox() { Text = "Data Info Text" } };
            dataGridInfoContent.ShowAsDocument(dockManager);

        }
开发者ID:apoorv-vijay-joshi,项目名称:FSE-2011-PDE,代码行数:63,代码来源:MainWindow.xaml.cs

示例6: ExportLayoutToDocument

        private void ExportLayoutToDocument(object sender, RoutedEventArgs e)
        {
            DocumentContent doc = new DocumentContent()
            {
                Title = string.Format("Layout_{0}", DateTime.Now.ToString()),
                Content = new TextBox()
                {
                    AcceptsReturn = true,
                    VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
                    HorizontalScrollBarVisibility = ScrollBarVisibility.Auto,
                    Text = DockManager.LayoutToString()
                }
            };

            doc.Show(DockManager);
            doc.Activate();
        }
开发者ID:Reticulatas,项目名称:AvalonDock,代码行数:17,代码来源:MainWindow.xaml.cs

示例7: BuildDockingLayout

        /// <summary>
        /// Initialise the proprety dock (dockManager of AvalonDock)
        /// </summary>
        void BuildDockingLayout()
        {
            dockManager.Content = null;

            // The name properties are needed to save and restore the layout
            dockManager.Name = "dockManagerName";

            BitmapImage propertiesIcon = new BitmapImage();
            propertiesIcon.BeginInit();
            propertiesIcon.UriSource = new Uri(@"/images/Properties_Icon.png", UriKind.RelativeOrAbsolute);
            propertiesIcon.EndInit();

            BitmapImage eventsIcon = new BitmapImage();
            eventsIcon.BeginInit();
            eventsIcon.UriSource = new Uri(@"/images/event.png", UriKind.RelativeOrAbsolute);
            eventsIcon.EndInit();

            dockableComponentProperties = new DockableContent() {
                Title = Properties.Resources.DockProperties,
                Content = null,
                Name = "dockComponentName",
                Icon = propertiesIcon
            };

            propertyDockScrollViewer = new ScrollViewer();
            propertyDockScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            propertyDockScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;

            StackPanel sp = new StackPanel();
            dockableComponentProperties.Content = sp;
            sp.Children.Add(propertyDockScrollViewer);
            dockableComponentProperties.Show(dockManager, AnchorStyle.Right);
            dockableComponentProperties.IsCloseable = false;

            scrollCanvars = new DocumentContent() {
                Title = Properties.Resources.DockMainWindow,
                Content = scrollViewer,
                Name = "dockDeploymentWindowName"
            };
            scrollCanvars.IsCloseable = false;
            scrollCanvars.Show(dockManager);

            // creating the tab for the gui designer
            InitGUITab();

            //TreeView dockable content
            dockableInportsList = new TreeView();
            BrushConverter bc = new BrushConverter();
            dockableInportsList.Background = (Brush)bc.ConvertFrom("#FFFFFFFF");
            dockableInportsList.IsTabStop = true;
            //dockableInportsList.Background = (Brush)bc.ConvertFrom("#FFE9ECFA");
            dockableOutportsList = new TreeView();
            dockableOutportsList.Background = (Brush)bc.ConvertFrom("#FFFFFFFF");
            //dockableOutportsList.Background = (Brush)bc.ConvertFrom("#FFE9ECFA");

            dockableInportsTab = new DockableContent() {
                Title = Properties.Resources.DockInPorts,
                Content = dockableInportsList,
                Visibility = Visibility.Collapsed,
                Name = "inputPortsName",
                Icon = propertiesIcon,
                IsCloseable = false
            };
            dockableOutportsTab = new DockableContent() {
                Title = Properties.Resources.DockOutPorts,
                Content = dockableOutportsList,
                Visibility = Visibility.Collapsed,
                Name = "outputPortsName",
                Icon = propertiesIcon,
                IsCloseable = false
            };

            // EventListenerGrid
            eventListenerDockScrollViewer = new ScrollViewer();
            eventListenerDockScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            eventListenerDockScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            dockableEventListenerTab = new DockableContent() {
                Title = Properties.Resources.PropertyDockEventListenerTab,
                Content = eventListenerDockScrollViewer,
                Visibility = Visibility.Collapsed,
                Name = "eventListenerName",
                Icon = eventsIcon,
                IsCloseable = false
            };
            eventListenerDockScrollViewer.SizeChanged += dockableEventListenerTriggerTab_SizeChanged;

            // EventTriggerGrid
            eventTriggerDockScrollViewer = new ScrollViewer();
            eventTriggerDockScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
            eventTriggerDockScrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto;
            dockableEventTriggerTab = new DockableContent() {
                Title = Properties.Resources.PropertyDockEventTriggerTab,
                Content = eventTriggerDockScrollViewer,
                Visibility = Visibility.Collapsed,
                Name = "eventTriggerName",
                Icon = eventsIcon,
                IsCloseable = false
//.........这里部分代码省略.........
开发者ID:Walid-Shouman,项目名称:AsTeRICS,代码行数:101,代码来源:MainWindow.xaml.cs


注:本文中的AvalonDock.DocumentContent.Show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。