public DocumentFloatingWindow(DockingManager manager, DocumentContent content) : this(manager) { //create a new temporary pane FloatingDockablePane pane = new FloatingDockablePane(this); //setup window size Width = content.ContainerPane.ActualWidth; Height = content.ContainerPane.ActualHeight; //save current content position in container pane _previousPane = content.ContainerPane; _arrayIndexPreviousPane = _previousPane.Items.IndexOf(content); pane.SetValue(ResizingPanel.ResizeWidthProperty, _previousPane.GetValue(ResizingPanel.ResizeWidthProperty)); pane.SetValue(ResizingPanel.ResizeHeightProperty, _previousPane.GetValue(ResizingPanel.ResizeHeightProperty)); //remove content from container pane content.ContainerPane.RemoveContent(_arrayIndexPreviousPane); //add content to my temporary pane pane.Items.Add(content); //let templates access this pane HostedPane = pane; if (IsDocumentFloatingAllowed) { AllowsTransparency = false; WindowStyle = WindowStyle.ToolWindow; NotifyPropertyChanged("IsDocumentFloatingAllowed"); } }
//ApplicationCommands.Close command.... public void ExecutedCloseCommand(object sender, ExecutedRoutedEventArgs e) { if (GetManager() == null) { return; } ManagedContent contentToClose = SelectedItem as ManagedContent; if (e.Parameter is ManagedContent) { contentToClose = e.Parameter as ManagedContent; } DockableContent dockableContent = contentToClose as DockableContent; if (dockableContent != null) { CloseOrHide(dockableContent); } else { DocumentContent documentContent = contentToClose as DocumentContent; documentContent.Close(); //if (documentContent != null) // Items.Remove(documentContent); //CheckContentsEmpty(); } }
internal override void OnEndDrag() { if (HostedPane.Items.Count > 0) { DocumentContent content = HostedPane.Items[0] as DocumentContent; if (!content.IsFloatingAllowed) { HostedPane.Items.RemoveAt(0); _previousPane.Items.Insert(_arrayIndexPreviousPane, content); _previousPane.SelectedItem = content; Close(); } else { DocumentPane originalDocumentPane = _previousPane as DocumentPane; originalDocumentPane.CheckContentsEmpty(); } } else { DocumentPane originalDocumentPane = _previousPane as DocumentPane; originalDocumentPane.CheckContentsEmpty(); Close(); } base.OnEndDrag(); }
//Sangdd 10/08/2011 /// <summary> /// Close dockablecontent /// </summary> /// <param name="contentToClose">Tra ve ten dockableconetn</param> void CloseThis(ManagedContent contentToClose) { if (GetManager() == null) { return; } if (contentToClose == null) { contentToClose = SelectedItem as ManagedContent; } DockableContent dockableContent = contentToClose as DockableContent; if (dockableContent != null) { dockableContent.Close(); } else { DocumentContent documentContent = contentToClose as DocumentContent; documentContent.Close(); } }
public IEditor NewEditor() { DocumentContent document = new DocumentContent(); Editor editor = new Editor(document); document.Show(manager); document.Activate(); return editor; }
void CloseAllButThis() { DocumentContent activeContent = GetManager().ActiveDocument as DocumentContent; foreach (DocumentContent cnt in this.GetManager().Documents.ToArray()) { if (cnt != activeContent) cnt.Close(); } }
private void OnViewsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (m_selector != null) { if (e.Action == NotifyCollectionChangedAction.Add) { ManagedContent managedContent = null; object newView = e.NewItems[0]; string header = GetHeaderInfoFromView(newView); if (m_selector is DockablePane) { managedContent = new DockableContent { Name = Name, Content = newView, DockableStyle = DockableStyle.Document, Title = header, Background = null, IsEnabled = true }; } else if (m_selector is DocumentPane) { managedContent = new DocumentContent { Name = Name, Content = newView, Title = header, Background = null, IsEnabled = true }; ((DocumentContent)managedContent).Closed += OnDocumentContentClosed; } if (managedContent != null) { m_viewToPaneMap.Add(newView, managedContent); m_selector.Items.Add(managedContent); } } else if (e.Action == NotifyCollectionChangedAction.Move) { } else if (e.Action == NotifyCollectionChangedAction.Reset) { } else if (e.Action == NotifyCollectionChangedAction.Remove) { } else if (e.Action == NotifyCollectionChangedAction.Replace) { } } }
private void AddDocument(string controller, string action) { var navHost = new NavHostControl(_navFactory); var doc = new DocumentContent(); doc.Title = "Document" + Model.MyDocuments.Count; doc.Content = navHost; Model.MyDocuments.Add(doc); // bring the newly added document's tab into focus. docPane.SelectedIndex = Model.MyDocuments.Count - 1; navHost.Navigate(controller, action); }
internal NavigatorWindowDocumentItem(DocumentContent document) : base(document) { _infoTip = document.InfoTip; if (_infoTip == null && document.ToolTip != null && document.ToolTip is string) { _infoTip = document.ToolTip.ToString(); } _contentTypeDescription = document.ContentTypeDescription; _lastActivation = document.LastActivation; }
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 }); }
protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); if (e.Cancel) { return; } if (this.HostedPane.Items.Count > 0) { DocumentContent docContent = this.HostedPane.Items[0] as DocumentContent; if (!docContent.Close()) { e.Cancel = true; } else { this.HostedPane.Items.Remove(docContent); } } }
protected override void OnExecuteCommand(object sender, ExecutedRoutedEventArgs e) { if (e.Command == TabbedDocumentCommand) { DocumentContent currentContent = HostedPane.SelectedItem as DocumentContent; _previousPane.Items.Insert(0, HostedPane.RemoveContent(HostedPane.SelectedIndex)); _previousPane.SelectedIndex = 0; if (HostedPane.Items.Count == 0) { this.Close(); } e.Handled = true; } else if (e.Command == CloseCommand) { DocumentContent docContent = this.HostedPane.Items[0] as DocumentContent; e.Handled = docContent.Close(); } base.OnExecuteCommand(sender, e); }
/// <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(); }
ResizingPanel RestoreResizingPanel(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments, ref DocumentPane mainDocumentPane) { ResizingPanel panel = null; if (mainElement.Name == "DocumentPaneResizingPanel") panel = new DocumentPaneResizingPanel(); else panel = new ResizingPanel(); if (mainElement.HasAttribute("Orientation")) panel.Orientation = (Orientation)Enum.Parse(typeof(Orientation), mainElement.GetAttribute("Orientation")); if (mainElement.HasAttribute("ResizeWidth")) ResizingPanel.SetResizeWidth(panel, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeWidth"))); if (mainElement.HasAttribute("ResizeHeight")) ResizingPanel.SetResizeHeight(panel, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeHeight"))); if (mainElement.HasAttribute("EffectiveSize")) ResizingPanel.SetEffectiveSize(panel, (Size)(new SizeConverter()).ConvertFromInvariantString(mainElement.GetAttribute("EffectiveSize"))); foreach (XmlElement childElement in mainElement.ChildNodes) { if (childElement.Name == "ResizingPanel" || childElement.Name == "DocumentPaneResizingPanel") { var childPanel = RestoreResizingPanel(childElement, actualContents, actualDocuments, ref mainDocumentPane); if (childPanel.Children.Count > 0) { panel.Children.Add(childPanel); } else { Debug.WriteLine("Found empty ResizingPanel in stored layout, it will be discarded."); } } #region Restore DockablePane else if (childElement.Name == "DockablePane") { var pane = RestoreDockablePaneLayout(childElement, actualContents, actualDocuments); //restore dockable panes even if no contents are inside (an hidden content could refer this pane in SaveStateAndPosition) panel.Children.Add(pane); } #endregion #region Restore Contents inside a DocumentPane else if (childElement.Name == "DocumentPane") { var documentPane = RestoreDocumentPaneLayout(childElement, actualContents, actualDocuments); bool isMainDocumentPane = false; if (childElement.HasAttribute("IsMain")) isMainDocumentPane = XmlConvert.ToBoolean(childElement.GetAttribute("IsMain")); if (documentPane.Items.Count > 0 || isMainDocumentPane) panel.Children.Add(documentPane); if (isMainDocumentPane) { if (mainDocumentPane != null) throw new InvalidOperationException("Main document pane is set more than one time"); mainDocumentPane = documentPane; } } #endregion } return panel; }
internal NavigatorWindowDocumentItem(DocumentContent document) : base(document) { _infoTip = document.InfoTip; if (_infoTip == null && document.ToolTip != null && document.ToolTip is string) _infoTip = document.ToolTip.ToString(); _contentTypeDescription = document.ContentTypeDescription; _lastActivation = document.LastActivation; }
void DocumentsSourceCollectionChanged( object sender, NotifyCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChangedAction.Reset) { //close first documents that do not belong to the MainDocumentPane DocumentContent[] docs = this.Documents.ToArray(); docs.Where(d => ((DocumentPane)d.Parent).IsMainDocumentPane.GetValueOrDefault()).ForEach(d => d.InternalClose()); docs.Where(d => d.Parent != null && !((DocumentPane)d.Parent).IsMainDocumentPane.GetValueOrDefault()).ForEach(d => d.InternalClose()); } if (e.OldItems != null && (e.Action == NotifyCollectionChangedAction.Remove || e.Action == NotifyCollectionChangedAction.Replace)) { foreach (object newDoc in e.OldItems) { if (newDoc is DocumentContent) { DocumentContent documentToAdd = newDoc as DocumentContent; documentToAdd.InternalClose(); } else if (newDoc is FrameworkElement) { DocumentContent docContainer = ((FrameworkElement)newDoc).Parent as DocumentContent; if (docContainer != null) docContainer.InternalClose(); } } } if (e.NewItems != null && (e.Action == NotifyCollectionChangedAction.Add || e.Action == NotifyCollectionChangedAction.Replace)) { if (MainDocumentPane == null) throw new InvalidOperationException("DockingManager must have at least a DocumentPane to host documents"); foreach (object newDoc in e.NewItems) { if (newDoc is DocumentContent) { DocumentContent documentToAdd = newDoc as DocumentContent; if (documentToAdd.Parent is DocumentPane) { ((DocumentPane)documentToAdd.Parent).Items.Clear(); } MainDocumentPane.Items.Add(documentToAdd); } else if (newDoc is UIElement) //limit objects to be at least framework elements { DocumentContent documentToAdd = new DocumentContent() { Content = newDoc }; MainDocumentPane.Items.Add(documentToAdd); } else throw new InvalidOperationException(string.Format("Unable to add type {0} as DocumentContent", newDoc)); } } RefreshContents(); }
///// <summary> ///// Restore from xml a document pane ///// </summary> ///// <param name="childElement"></param> ///// <param name="mainExistingDocumentPane"></param> ///// <param name="existingDocumentPanel"></param> ///// <param name="dockableContents"></param> //void RestoreDocumentPaneLayout(XmlElement childElement, out DocumentPane mainExistingDocumentPane, out DocumentPaneResizingPanel existingDocumentPanel, DockableContent[] dockableContents) //{ // mainExistingDocumentPane = (Content is DocumentPane) ? Content as DocumentPane : GetMainDocumentPane(Content as ResizingPanel); // if (mainExistingDocumentPane != null) // { // existingDocumentPanel = mainExistingDocumentPane.GetParentDocumentPaneResizingPanel(); // } // else // { // existingDocumentPanel = null; // } // if (existingDocumentPanel != null) // { // if (existingDocumentPanel.Parent is ResizingPanel) // { // ((ResizingPanel)existingDocumentPanel.Parent).RemoveChild(existingDocumentPanel); // } // else if (existingDocumentPanel.Parent is DockingManager) // { // ((DockingManager)existingDocumentPanel.Parent).Content = null; // } // } // else if (mainExistingDocumentPane != null) // { // if (mainExistingDocumentPane.Parent is ResizingPanel) // { // ((ResizingPanel)mainExistingDocumentPane.Parent).RemoveChild(mainExistingDocumentPane); // } // else if (mainExistingDocumentPane.Parent is DockingManager) // { // ((DockingManager)mainExistingDocumentPane.Parent).Content = null; // } // } // foreach (XmlElement contentElement in childElement.ChildNodes) // { // if (contentElement.HasAttribute("Name")) // { // DockableContent foundContent = null; // string contentName = contentElement.GetAttribute("Name"); // foreach (DockableContent content in dockableContents) // { // if (content.Name == contentName) // { // foundContent = content; // break; // } // } // if (foundContent == null && // DeserializationCallback != null) // { // DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); // DeserializationCallback(this, e); // foundContent = e.Content as DockableContent; // } // if (foundContent != null) // { // DetachContentFromDockingManager(foundContent); // mainExistingDocumentPane.Items.Add(foundContent); // foundContent.SetStateToDocument(); // //call custom layout persistence method // foundContent.RestoreLayout(contentElement); // } // } // } //} DocumentPane RestoreDocumentPaneLayout(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments) { var documentPane = new DocumentPane(); if (mainElement.HasAttribute("ResizeWidth")) ResizingPanel.SetResizeWidth(documentPane, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeWidth"))); if (mainElement.HasAttribute("ResizeHeight")) ResizingPanel.SetResizeHeight(documentPane, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeHeight"))); if (mainElement.HasAttribute("EffectiveSize")) ResizingPanel.SetEffectiveSize(documentPane, (Size)(new SizeConverter()).ConvertFromInvariantString(mainElement.GetAttribute("EffectiveSize"))); foreach (XmlElement contentElement in mainElement.ChildNodes) { if (contentElement.Name == "DockableContent" && contentElement.HasAttribute("Name")) { DockableContent foundContent = null; string contentName = contentElement.GetAttribute("Name"); foundContent = actualContents.FirstOrDefault(c => c.Name == contentName); if (foundContent == null && DeserializationCallback != null) { DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); DeserializationCallback(this, e); foundContent = e.Content as DockableContent; } if (foundContent != null) { DetachContentFromDockingManager(foundContent); documentPane.Items.Add(foundContent); foundContent.SetStateToDocument(); //call custom layout persistence method foundContent.RestoreLayout(contentElement); } } else if (contentElement.Name == "DocumentContent" && contentElement.HasAttribute("Name")) { DocumentContent foundDocument = null; string contentName = contentElement.GetAttribute("Name"); foundDocument = actualDocuments.FirstOrDefault(c => c.Name == contentName); if (foundDocument == null && DeserializationCallback != null) { DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); DeserializationCallback(this, e); foundDocument = e.Content as DocumentContent; } if (foundDocument != null) { foundDocument.DetachFromContainerPane(); documentPane.Items.Add(foundDocument); } } } if (mainElement.HasAttribute("SelectedIndex")) documentPane.SelectedIndex = XmlConvert.ToInt32(mainElement.GetAttribute("SelectedIndex")); return documentPane; }
/* * CHANGE: */ public void AddDocumentForLayoutRestore(DocumentContent content) { this.Documents.Add(content); }
/// <summary> /// Show or add a document in AvalonDock /// </summary> /// <param name="document">Document to show/add.</param> /// <remarks>If document provided is not present in the <see cref="Documents"/> list, this method inserts it in first position of <see cref="MainDocumentPane.Items"/> collection. /// In both cases select it in the container <see cref="DocumentPane"/>.</remarks> internal void Show(DocumentContent document) { bool found = Documents.FirstOrDefault(d => d == document) != null; if (!found && MainDocumentPane != null) { if (document.Parent is DocumentPane) { ((DocumentPane)document.Parent).Items.Clear(); } MainDocumentPane.Items.Insert(0, document); } }
public Editor(DocumentContent window) { this.window = window; textBox = new TextBox(); window.Content = textBox; }
DocumentContent CreateContentFor(Document doc) { var content = new DocumentContent() { DataContext = doc, Content = new DocumentView(doc) }; content.SetBinding(DocumentContent.TitleProperty, "Title"); return content; }
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); }
internal void Drag(DocumentContent documentContent, Point point, Point offset) { if (CaptureMouse()) { DocumentFloatingWindow floatingWindow = new DocumentFloatingWindow(this); floatingWindow.Owner = Window.GetWindow(this); floatingWindow.CopyInputBindingsFromOwner(); floatingWindow.Content = documentContent; Drag(floatingWindow, point, offset); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 12 "..\..\..\MainWindow.xaml" ((AvalonDock.DemoApp.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 12 "..\..\..\MainWindow.xaml" ((AvalonDock.DemoApp.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden return; case 2: #line 24 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnShowDockableContent); #line default #line hidden return; case 3: #line 32 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnCreateNewDockableContent); #line default #line hidden return; case 4: #line 33 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnCreateNewDockableContent); #line default #line hidden return; case 5: #line 38 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnShowDocumentContent); #line default #line hidden return; case 6: #line 46 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OnCreateNewDocumentContent); #line default #line hidden return; case 7: #line 50 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveToLayoutFile); #line default #line hidden return; case 8: #line 51 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveToLayoutFile); #line default #line hidden return; case 9: #line 52 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveToLayoutFile); #line default #line hidden return; case 10: #line 53 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveToLayoutFile); #line default #line hidden return; case 11: #line 56 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RestoreFromLayoutFile); #line default #line hidden return; case 12: #line 57 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RestoreFromLayoutFile); #line default #line hidden return; case 13: #line 58 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RestoreFromLayoutFile); #line default #line hidden return; case 14: #line 59 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.RestoreFromLayoutFile); #line default #line hidden return; case 15: #line 61 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ExportLayoutToDocument); #line default #line hidden return; case 16: #line 62 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ImportLayoutFromDocument); #line default #line hidden return; case 17: #line 63 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ResetContent); #line default #line hidden return; case 18: #line 66 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeStandardTheme); #line default #line hidden return; case 19: #line 67 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeStandardTheme); #line default #line hidden return; case 20: #line 68 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeStandardTheme); #line default #line hidden return; case 21: #line 69 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeStandardTheme); #line default #line hidden return; case 22: #line 71 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeCustomTheme); #line default #line hidden return; case 23: #line 72 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeCustomTheme); #line default #line hidden return; case 24: #line 75 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SetDefaultTheme); #line default #line hidden return; case 25: #line 78 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor); #line default #line hidden return; case 26: #line 79 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor); #line default #line hidden return; case 27: #line 80 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor); #line default #line hidden return; case 28: #line 81 "..\..\..\MainWindow.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor); #line default #line hidden return; case 29: this.DockManager = ((AvalonDock.DockingManager)(target)); #line 87 "..\..\..\MainWindow.xaml" this.DockManager.Loaded += new System.Windows.RoutedEventHandler(this.DockManager_Loaded); #line default #line hidden #line 88 "..\..\..\MainWindow.xaml" this.DockManager.DocumentClosing += new System.EventHandler <System.ComponentModel.CancelEventArgs>(this.DockManager_DocumentClosing); #line default #line hidden return; case 30: this.Content1 = ((AvalonDock.DemoApp.SampleDockableContent)(target)); return; case 31: this.Content2 = ((AvalonDock.DemoApp.SampleDockableContent)(target)); return; case 32: this.Content3 = ((AvalonDock.DemoApp.SampleDockableContent)(target)); return; case 33: this.Content4 = ((AvalonDock.DemoApp.SampleDockableContent)(target)); return; case 34: this.DockingManagerPropertiesHost = ((AvalonDock.DockableContent)(target)); return; case 35: this.NestedDockingManager = ((AvalonDock.DockableContent)(target)); return; case 36: this.InnerContent1 = ((AvalonDock.DemoApp.SampleDockableContent)(target)); return; case 37: this.InnerDoc1 = ((AvalonDock.DocumentContent)(target)); return; case 38: this.DocumentHost = ((AvalonDock.DocumentPane)(target)); return; case 39: this.Doc1 = ((AvalonDock.DocumentContent)(target)); return; case 40: this.Doc2 = ((AvalonDock.DocumentContent)(target)); return; case 41: this.Doc3 = ((AvalonDock.DocumentContent)(target)); return; case 42: this.Doc4 = ((AvalonDock.DocumentContent)(target)); return; case 43: this.zoomSlider = ((System.Windows.Controls.Slider)(target)); return; } this._contentLoaded = true; }
internal void Drag(DocumentContent documentContent, Point point, Point offset) { if (CaptureMouse()) { DocumentFloatingWindow floatingWindow = new DocumentFloatingWindow(this); floatingWindow.Content = documentContent; Drag(floatingWindow, point, offset); } }
/// <summary> /// Shows a document. Puts it in the document pane. /// </summary> /// <param name="document"></param> public IDocument ShowDocument(IDocument document, string memento, bool makeActive) { IDocument doc = document.CreateDocument(memento); if (doc != null) { if (!m_documentLookup.ContainsKey(doc)) { DocumentContent content = new DocumentContent(); setManagedContentProperties(doc, content); m_documentLookup.Add(doc, content); m_docPane.Items.Add(content); // all these event handlers get unsubscribed in the content_Closing method doc.PropertyChanged += new PropertyChangedEventHandler(doc_PropertyChanged); content.Closing += new EventHandler<System.ComponentModel.CancelEventArgs>(doc.OnClosing); content.Closed += new EventHandler(content_Closed); content.GotFocus += new RoutedEventHandler(doc.OnGotFocus); content.LostFocus += new RoutedEventHandler(doc.OnLostFocus); document.OnOpened(content, new EventArgs()); } m_documentLookup[doc].Show(DockManager); if (makeActive) { DockManager.ActiveDocument = m_documentLookup[doc]; } } return doc; }
internal void HandleDocumentOpen(DocumentContent contentClosed) { IList listToUpdate = DocumentsSource as IList; if (listToUpdate != null) listToUpdate.Add(contentClosed); }
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(); }
/// <summary> /// Show or add a document in AvalonDock /// </summary> /// <param name="document">Document to show/add.</param> /// <param name="floating">Indicates if the document should be placed in a floating window</param> /// <remarks>If document provided is not present in the <see cref="Documents"/> list, this method inserts it in first position of <see cref="MainDocumentPane.Items"/> collection. /// In both cases select it in the container <see cref="DocumentPane"/>.</remarks> internal void Show(DocumentContent document, bool floating) { bool found = Documents.FirstOrDefault(d => d == document) != null; if (!found && MainDocumentPane != null) { if (document.Parent is DocumentPane) { ((DocumentPane)document.Parent).Items.Clear(); } if (floating) { DocumentFloatingWindow floatingWindow = new DocumentFloatingWindow(this); floatingWindow.Owner = Window.GetWindow(this); floatingWindow.Content = document; floatingWindow.Show(); } else MainDocumentPane.Items.Insert(0, document); } else if (found && document.ContainerPane is FloatingDocumentPane) { var containerPane = document.ContainerPane as FloatingDocumentPane; DocumentPane previousPane = containerPane.PreviousPane; int arrayIndexPreviuosPane = containerPane.ArrayIndexPreviousPane; //if previous pane exist that redock to it if (previousPane == null || previousPane.GetManager() != this) { previousPane = MainDocumentPane; arrayIndexPreviuosPane = 0; } if (previousPane != null) { if (arrayIndexPreviuosPane > previousPane.Items.Count) arrayIndexPreviuosPane = previousPane.Items.Count; previousPane.Items.Insert(arrayIndexPreviuosPane, containerPane.RemoveContent(0)); } containerPane.FloatingWindow.Close(); } }
internal FloatingDocumentPane(DocumentFloatingWindow floatingWindow, DocumentContent documentToTransfer) { _floatingWindow = floatingWindow; _documentToTransfer = documentToTransfer; }
DockablePane RestoreDockablePaneLayout(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments) { DockablePane pane = new DockablePane(); if (mainElement.HasAttribute("Anchor")) pane.Anchor = (AnchorStyle)Enum.Parse(typeof(AnchorStyle), mainElement.GetAttribute("Anchor")); if (mainElement.HasAttribute("ResizeWidth")) ResizingPanel.SetResizeWidth(pane, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeWidth"))); if (mainElement.HasAttribute("ResizeHeight")) ResizingPanel.SetResizeHeight(pane, (GridLength)GLConverter.ConvertFromInvariantString(mainElement.GetAttribute("ResizeHeight"))); if (mainElement.HasAttribute("EffectiveSize")) ResizingPanel.SetEffectiveSize(pane, (Size)(new SizeConverter()).ConvertFromInvariantString(mainElement.GetAttribute("EffectiveSize"))); if (mainElement.HasAttribute("ID")) pane.ID = new Guid(mainElement.GetAttribute("ID")); bool toggleAutoHide = false; if (mainElement.HasAttribute("IsAutoHidden")) toggleAutoHide = XmlConvert.ToBoolean(mainElement.GetAttribute("IsAutoHidden")); foreach (XmlElement contentElement in mainElement.ChildNodes) { if (contentElement.HasAttribute("Name")) { DockableContent foundContent = null; string contentName = contentElement.GetAttribute("Name"); foundContent = actualContents.FirstOrDefault(c => c.Name == contentName); if (foundContent == null && DeserializationCallback != null) { DeserializationCallbackEventArgs e = new DeserializationCallbackEventArgs(contentName); DeserializationCallback(this, e); foundContent = e.Content as DockableContent; } if (foundContent != null) { DetachContentFromDockingManager(foundContent); pane.Items.Add(foundContent); foundContent.SetStateToDock(); //call custom layout persistence method foundContent.RestoreLayout(contentElement); } } } if (toggleAutoHide && pane.Items.Count > 0) ToggleAutoHide(pane); if (mainElement.HasAttribute("SelectedIndex")) pane.SelectedIndex = XmlConvert.ToInt32(mainElement.GetAttribute("SelectedIndex")); return pane; }
public DocumentAddedEventArgs(DocumentContent document) { Document = document; }
/// <summary> /// Restore from xml a resizing panel or a documentpane /// </summary> /// <param name="mainElement"></param> /// <param name="actualContents"></param> /// <returns></returns> object RestoreLayout(XmlElement mainElement, DockableContent[] actualContents, DocumentContent[] actualDocuments, ref DocumentPane mainDocumentPane) { if (mainElement == null) throw new ArgumentNullException("mainElement"); if (mainElement.Name == "ResizingPanel" || mainElement.Name == "DocumentPaneResizingPanel") { return RestoreResizingPanel(mainElement, actualContents, actualDocuments, ref mainDocumentPane); } else if (mainElement.Name == "DocumentPane") { mainDocumentPane = RestoreDocumentPaneLayout(mainElement, actualContents, actualDocuments); return mainDocumentPane; } throw new InvalidOperationException(string.Format("Unable to deserialize '{0}' element", mainElement.Name)); }
public static void ShowDocument(DocumentContent doc, bool floating) { doc.Show(DockingManager, floating); doc.Activate(); }
void SaveLayout(XmlWriter xmlWriter, DocumentContent content) { if (!string.IsNullOrEmpty(content.Name)) { xmlWriter.WriteStartElement("DocumentContent"); xmlWriter.WriteAttributeString("Name", content.Name); content.SaveLayout(xmlWriter); xmlWriter.WriteEndElement(); } }
public RequestDocumentCloseEventArgs(DocumentContent doc) { DocumentToClose = doc; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 6 "..\..\..\MainWindow.xaml" ((CAGA.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 6 "..\..\..\MainWindow.xaml" ((CAGA.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.RibbonWindow_Closing); #line default #line hidden return; case 2: this.mainGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.ribbon = ((Microsoft.Windows.Controls.Ribbon.Ribbon)(target)); return; case 4: this.RibbonMapGrp = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 5: this.OpenMapBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 24 "..\..\..\MainWindow.xaml" this.OpenMapBtn.Click += new System.Windows.RoutedEventHandler(this.OpenMapBtn_Click); #line default #line hidden return; case 6: this.SaveMapBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 25 "..\..\..\MainWindow.xaml" this.SaveMapBtn.Click += new System.Windows.RoutedEventHandler(this.SaveMapBtn_Click); #line default #line hidden return; case 7: this.RibbonLayersGrp = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 8: this.AddLayerBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 29 "..\..\..\MainWindow.xaml" this.AddLayerBtn.Click += new System.Windows.RoutedEventHandler(this.AddLayerBtn_Click); #line default #line hidden return; case 9: this.RemoveLayerBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 30 "..\..\..\MainWindow.xaml" this.RemoveLayerBtn.Click += new System.Windows.RoutedEventHandler(this.RemoveLayerBtn_Click); #line default #line hidden return; case 10: this.RibbonNavGrp = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 11: this.PanMapBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonToggleButton)(target)); #line 33 "..\..\..\MainWindow.xaml" this.PanMapBtn.Checked += new System.Windows.RoutedEventHandler(this.PanMapBtn_Checked); #line default #line hidden #line 33 "..\..\..\MainWindow.xaml" this.PanMapBtn.Unchecked += new System.Windows.RoutedEventHandler(this.PanMapBtn_Unchecked); #line default #line hidden return; case 12: this.ZoomInBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonToggleButton)(target)); #line 34 "..\..\..\MainWindow.xaml" this.ZoomInBtn.Checked += new System.Windows.RoutedEventHandler(this.ZoomInBtn_Checked); #line default #line hidden #line 34 "..\..\..\MainWindow.xaml" this.ZoomInBtn.Unchecked += new System.Windows.RoutedEventHandler(this.ZoomInBtn_Unchecked); #line default #line hidden return; case 13: this.ZoomOutBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonToggleButton)(target)); #line 35 "..\..\..\MainWindow.xaml" this.ZoomOutBtn.Checked += new System.Windows.RoutedEventHandler(this.ZoomOutBtn_Checked); #line default #line hidden #line 35 "..\..\..\MainWindow.xaml" this.ZoomOutBtn.Unchecked += new System.Windows.RoutedEventHandler(this.ZoomOutBtn_Unchecked); #line default #line hidden return; case 14: this.ZoomToExtentBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 36 "..\..\..\MainWindow.xaml" this.ZoomToExtentBtn.Click += new System.Windows.RoutedEventHandler(this.ZoomToExtentBtn_Click); #line default #line hidden return; case 15: this.ZoomToPrevBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 37 "..\..\..\MainWindow.xaml" this.ZoomToPrevBtn.Click += new System.Windows.RoutedEventHandler(this.ZoomToPrevBtn_Click); #line default #line hidden return; case 16: this.ZoomToNextBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 38 "..\..\..\MainWindow.xaml" this.ZoomToNextBtn.Click += new System.Windows.RoutedEventHandler(this.ZoomToNextBtn_Click); #line default #line hidden return; case 17: this.ZoomToLayerBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 39 "..\..\..\MainWindow.xaml" this.ZoomToLayerBtn.Click += new System.Windows.RoutedEventHandler(this.ZoomToLayerBtn_Click); #line default #line hidden return; case 18: this.RibbonSelectionGrp = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 19: this.SelectFeatureBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonSplitButton)(target)); #line 42 "..\..\..\MainWindow.xaml" this.SelectFeatureBtn.Click += new System.Windows.RoutedEventHandler(this.SelectFeatureBtn_Click); #line default #line hidden return; case 20: this.SelectFeatureGallery = ((Microsoft.Windows.Controls.Ribbon.RibbonGallery)(target)); return; case 21: this.SelByRectItem = ((Microsoft.Windows.Controls.Ribbon.RibbonGalleryItem)(target)); #line 45 "..\..\..\MainWindow.xaml" this.SelByRectItem.Selected += new System.Windows.RoutedEventHandler(this.SelectFeatureItem_Selected); #line default #line hidden return; case 22: this.SelByPolyItem = ((Microsoft.Windows.Controls.Ribbon.RibbonGalleryItem)(target)); #line 46 "..\..\..\MainWindow.xaml" this.SelByPolyItem.Selected += new System.Windows.RoutedEventHandler(this.SelectFeatureItem_Selected); #line default #line hidden return; case 23: this.SelByCircleItem = ((Microsoft.Windows.Controls.Ribbon.RibbonGalleryItem)(target)); #line 47 "..\..\..\MainWindow.xaml" this.SelByCircleItem.Selected += new System.Windows.RoutedEventHandler(this.SelectFeatureItem_Selected); #line default #line hidden return; case 24: this.SelByLineItem = ((Microsoft.Windows.Controls.Ribbon.RibbonGalleryItem)(target)); #line 48 "..\..\..\MainWindow.xaml" this.SelByLineItem.Selected += new System.Windows.RoutedEventHandler(this.SelectFeatureItem_Selected); #line default #line hidden return; case 25: this.SelectByGraphicsBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 52 "..\..\..\MainWindow.xaml" this.SelectByGraphicsBtn.Click += new System.Windows.RoutedEventHandler(this.SelectByGraphicsBtn_Click); #line default #line hidden return; case 26: this.UnselectFeatureBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 53 "..\..\..\MainWindow.xaml" this.UnselectFeatureBtn.Click += new System.Windows.RoutedEventHandler(this.UnselectFeatureBtn_Click); #line default #line hidden return; case 27: this.RibbonToolsGrp = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 28: this.IdentifyFeatureBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonToggleButton)(target)); #line 56 "..\..\..\MainWindow.xaml" this.IdentifyFeatureBtn.Checked += new System.Windows.RoutedEventHandler(this.IdentifyFeatureBtn_Checked); #line default #line hidden #line 56 "..\..\..\MainWindow.xaml" this.IdentifyFeatureBtn.Unchecked += new System.Windows.RoutedEventHandler(this.IdentifyFeatureBtn_Unchecked); #line default #line hidden return; case 29: this.AttrTableBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 57 "..\..\..\MainWindow.xaml" this.AttrTableBtn.Click += new System.Windows.RoutedEventHandler(this.AttrTableBtn_Click); #line default #line hidden return; case 30: this.RibbonDrawingGrp = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 31: this.DrawPolygonBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonToggleButton)(target)); #line 60 "..\..\..\MainWindow.xaml" this.DrawPolygonBtn.Checked += new System.Windows.RoutedEventHandler(this.DrawPolygonBtn_Checked); #line default #line hidden #line 60 "..\..\..\MainWindow.xaml" this.DrawPolygonBtn.Unchecked += new System.Windows.RoutedEventHandler(this.DrawPolygonBtn_Unchecked); #line default #line hidden return; case 32: this.RibbonDlgMgrGrp = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 33: this.ToggleDlgBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 66 "..\..\..\MainWindow.xaml" this.ToggleDlgBtn.Click += new System.Windows.RoutedEventHandler(this.ToggleDlgBtn_Click); #line default #line hidden return; case 34: this.RibbonSpeechRecGrp = ((Microsoft.Windows.Controls.Ribbon.RibbonGroup)(target)); return; case 35: this.ToggleSpeechBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 69 "..\..\..\MainWindow.xaml" this.ToggleSpeechBtn.Click += new System.Windows.RoutedEventHandler(this.ToggleSpeechBtn_Click); #line default #line hidden return; case 36: this.SimSpeechBtn = ((Microsoft.Windows.Controls.Ribbon.RibbonButton)(target)); #line 70 "..\..\..\MainWindow.xaml" this.SimSpeechBtn.Click += new System.Windows.RoutedEventHandler(this.SimSpeechBtn_Click); #line default #line hidden return; case 37: this.dockManager = ((AvalonDock.DockingManager)(target)); return; case 38: this.LayersPanel = ((AvalonDock.DockableContent)(target)); return; case 39: this.tocGrid = ((System.Windows.Controls.Grid)(target)); return; case 40: #line 84 "..\..\..\MainWindow.xaml" ((AvalonDock.DocumentPane)(target)).SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.DocumentPane_SelectionChanged); #line default #line hidden return; case 41: this.MapPanel = ((AvalonDock.DocumentContent)(target)); return; case 42: this.mapGrid = ((System.Windows.Controls.Grid)(target)); return; case 43: this.LayoutPanel = ((AvalonDock.DocumentContent)(target)); return; case 44: this.layoutGrid = ((System.Windows.Controls.Grid)(target)); return; case 45: this.KinectCtrlPanel = ((AvalonDock.DockablePane)(target)); return; case 46: this.ColorDisplayPanel = ((AvalonDock.DockableContent)(target)); return; case 47: this.colorDisplay = ((System.Windows.Controls.Image)(target)); return; case 48: this.skeletonCanvas = ((System.Windows.Controls.Canvas)(target)); return; case 49: this.DepthDisplayPanel = ((AvalonDock.DockableContent)(target)); return; case 50: this.depthDisplay = ((System.Windows.Controls.Image)(target)); return; case 51: this.DevCtrlPanel = ((AvalonDock.DockablePane)(target)); return; case 52: this.statusTB = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Ajoute la plugin à la liste /// </summary> /// <param name="doc">Le document à ajouter</param> public void AjoutOnglet(DocumentContent doc) { this.ListeDocuments.Add(doc); }
public void AddNewTab(DocumentContent newTab) { this.DocumentManager.Items.Add(newTab); newTab.Focus(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 6 "..\..\Demo.xaml" ((AvalonDockTest.Demo)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing); #line default #line hidden #line 6 "..\..\Demo.xaml" ((AvalonDockTest.Demo)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.ShowDockingManager = ((System.Windows.Controls.MenuItem)(target)); #line 90 "..\..\Demo.xaml" this.ShowDockingManager.Click += new System.Windows.RoutedEventHandler(this.ShowDockingManager_Checked); #line default #line hidden return; case 3: #line 91 "..\..\Demo.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked); #line default #line hidden return; case 4: #line 92 "..\..\Demo.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked); #line default #line hidden return; case 5: #line 93 "..\..\Demo.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked); #line default #line hidden return; case 6: #line 94 "..\..\Demo.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked); #line default #line hidden return; case 7: #line 95 "..\..\Demo.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked); #line default #line hidden return; case 8: #line 96 "..\..\Demo.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked); #line default #line hidden return; case 9: #line 97 "..\..\Demo.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ChangeColor_Clicked); #line default #line hidden return; case 10: #line 99 "..\..\Demo.xaml" ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ResetColors_Clicked); #line default #line hidden return; case 11: this.TestContainer = ((System.Windows.Controls.ContentControl)(target)); return; case 12: this._dockingManager = ((AvalonDock.DockingManager)(target)); return; case 13: this._propertiesWindow = ((AvalonDock.DockableContent)(target)); return; case 14: this._documentsHost = ((AvalonDock.DocumentPane)(target)); return; case 15: this.docHome = ((AvalonDock.DocumentContent)(target)); #line 124 "..\..\Demo.xaml" this.docHome.Closing += new System.EventHandler <System.ComponentModel.CancelEventArgs>(this.doc_Closing); #line default #line hidden return; case 16: this.NewDocuments = ((System.Windows.Documents.Hyperlink)(target)); #line 194 "..\..\Demo.xaml" this.NewDocuments.Click += new System.Windows.RoutedEventHandler(this.NewDocuments_Click); #line default #line hidden return; case 17: this.ShowProperties = ((System.Windows.Documents.Hyperlink)(target)); #line 196 "..\..\Demo.xaml" this.ShowProperties.Click += new System.Windows.RoutedEventHandler(this.ShowProperties_Click); #line default #line hidden return; case 18: this.ShowProperties_AutoHide = ((System.Windows.Documents.Hyperlink)(target)); #line 197 "..\..\Demo.xaml" this.ShowProperties_AutoHide.Click += new System.Windows.RoutedEventHandler(this.ShowProperties_Click); #line default #line hidden return; case 19: this.ShowProperties_FloatingWindow = ((System.Windows.Documents.Hyperlink)(target)); #line 198 "..\..\Demo.xaml" this.ShowProperties_FloatingWindow.Click += new System.Windows.RoutedEventHandler(this.ShowProperties_Click); #line default #line hidden return; case 20: this.ShowExplorer = ((System.Windows.Documents.Hyperlink)(target)); #line 200 "..\..\Demo.xaml" this.ShowExplorer.Click += new System.Windows.RoutedEventHandler(this.ShowExplorer_Click); #line default #line hidden return; case 21: this.ShowExplorer_AutoHide = ((System.Windows.Documents.Hyperlink)(target)); #line 201 "..\..\Demo.xaml" this.ShowExplorer_AutoHide.Click += new System.Windows.RoutedEventHandler(this.ShowExplorer_Click); #line default #line hidden return; case 22: this.ShowExplorer_FloatingWindow = ((System.Windows.Documents.Hyperlink)(target)); #line 202 "..\..\Demo.xaml" this.ShowExplorer_FloatingWindow.Click += new System.Windows.RoutedEventHandler(this.ShowExplorer_Click); #line default #line hidden return; case 23: this.ShowEventsLog = ((System.Windows.Documents.Hyperlink)(target)); #line 204 "..\..\Demo.xaml" this.ShowEventsLog.Click += new System.Windows.RoutedEventHandler(this.ShowEventsLog_Click); #line default #line hidden return; case 24: this.ShowEventsLog_AutoHide = ((System.Windows.Documents.Hyperlink)(target)); #line 205 "..\..\Demo.xaml" this.ShowEventsLog_AutoHide.Click += new System.Windows.RoutedEventHandler(this.ShowEventsLog_Click); #line default #line hidden return; case 25: this.ShowEventsLog_FloatingWindow = ((System.Windows.Documents.Hyperlink)(target)); #line 206 "..\..\Demo.xaml" this.ShowEventsLog_FloatingWindow.Click += new System.Windows.RoutedEventHandler(this.ShowEventsLog_Click); #line default #line hidden return; case 26: this.ShowEventsLog_DockRight = ((System.Windows.Documents.Hyperlink)(target)); #line 207 "..\..\Demo.xaml" this.ShowEventsLog_DockRight.Click += new System.Windows.RoutedEventHandler(this.ShowEventsLog_Click); #line default #line hidden return; case 27: this.ShowProperty = ((System.Windows.Documents.Hyperlink)(target)); #line 209 "..\..\Demo.xaml" this.ShowProperty.Click += new System.Windows.RoutedEventHandler(this.ShowProperty_Click); #line default #line hidden return; case 28: this.ShowProperty_AutoHide = ((System.Windows.Documents.Hyperlink)(target)); #line 210 "..\..\Demo.xaml" this.ShowProperty_AutoHide.Click += new System.Windows.RoutedEventHandler(this.ShowProperty_Click); #line default #line hidden return; case 29: this.ShowProperty_FloatingWindow = ((System.Windows.Documents.Hyperlink)(target)); #line 211 "..\..\Demo.xaml" this.ShowProperty_FloatingWindow.Click += new System.Windows.RoutedEventHandler(this.ShowProperty_Click); #line default #line hidden return; case 30: this.ShowProperty_DockRight = ((System.Windows.Documents.Hyperlink)(target)); #line 212 "..\..\Demo.xaml" this.ShowProperty_DockRight.Click += new System.Windows.RoutedEventHandler(this.ShowProperty_Click); #line default #line hidden return; case 31: this.SaveLayout = ((System.Windows.Documents.Hyperlink)(target)); #line 214 "..\..\Demo.xaml" this.SaveLayout.Click += new System.Windows.RoutedEventHandler(this.SaveLayout_Click); #line default #line hidden return; case 32: this.RestoreLayout = ((System.Windows.Documents.Hyperlink)(target)); #line 215 "..\..\Demo.xaml" this.RestoreLayout.Click += new System.Windows.RoutedEventHandler(this.RestoreLayout_Click); #line default #line hidden return; case 33: this._objectExplorerHost = ((AvalonDock.DockableContent)(target)); return; case 34: this._errorList = ((AvalonDockTest.ErrorListContent)(target)); return; case 35: this._eventsLogWindow = ((AvalonDock.DockableContent)(target)); return; case 36: this._txtLog = ((System.Windows.Controls.TextBox)(target)); return; case 37: this._explorerWindow = ((AvalonDock.DockableContent)(target)); return; case 38: this.tabControl = ((System.Windows.Controls.TabControl)(target)); return; case 39: this.ButtonDefault = ((System.Windows.Controls.Button)(target)); #line 271 "..\..\Demo.xaml" this.ButtonDefault.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 40: this.ButtonDefault2 = ((System.Windows.Controls.Button)(target)); #line 275 "..\..\Demo.xaml" this.ButtonDefault2.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; case 41: this.ButtonDefault3 = ((System.Windows.Controls.Button)(target)); #line 276 "..\..\Demo.xaml" this.ButtonDefault3.Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; } this._contentLoaded = true; }