avalondock

Prevent document from closing in DockingManager

南楼画角 提交于 2019-12-11 10:29:20
问题 Here's a sample, which uses DockingManager (a.k.a AvalonDock) from Extended WPF Toolkit. View model: public class Person { public string Name { get; set; } public bool CanClose { get; set; } } View: <Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" xmlns:local="clr-namespace:WpfApplication2"> <Grid> <xcad:DockingManager

Disable drop targets (layouts) in Avalondock

*爱你&永不变心* 提交于 2019-12-10 14:41:25
问题 I am using the open source library AvalonDock to support drag and drop of multiple tabs (panes) outside and back to the MainWindow and I want to disable most of the possible drop targets (or lets say layouts) like placing a tab below another or placing tabs side by side. In other words I only want to allow placing tabs in a "row of tabs" like in firefox or chrome browser. Is there any property to disable drop targets (layouts) and if yes, can you please provide me with a short code example?

Unhandled 'System.ComponentModel.Win32Exception' when using AvalonDock 2.0

烂漫一生 提交于 2019-12-10 03:45:29
问题 I'm using AvalonDock 2.0, and when ever I open a dock container, while on debugging mode the application crash (it works fine when running without debugging). I get the below exception: An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in WindowsBase.dll Additional information: The operation completed successfully I came across this answer, which suggest to uncheck the boxes from the Exception Settings. The wired thing is that it worked the first time used it. but

Does the DockingManager come with a built-in method for handling Anchorables

删除回忆录丶 提交于 2019-12-10 03:14:40
问题 When setting up AvalonDock with a set of Anchorables, for example: <a:LayoutRoot> <a:LayoutPanel Orientation="Horizontal"> <a:LayoutAnchorablePane> <a:LayoutAnchorable Title="A1"> <!-- content --> </a:LayoutAnchorable> <a:LayoutAnchorable Title="A2"> <!-- content --> </a:LayoutAnchorable> </a:LayoutAnchorablePane> <!-- ... --> Does the DockingManager (or something else in AvalonDock) come with a built-in way of managing Anchorables that are closed? Are they stored in a collection somewhere so

AvalonDock 2 with Caliburn Micro

你。 提交于 2019-12-09 12:41:30
问题 Are there any blogs or articles about using AvalonDock with Caliburn Micro MVVM? Didn't find much when Googling http://avalondock.codeplex.com/ edit: Got an up vote so why not update with a final solution. Full code can be found here https://github.com/AndersMalmgren/FreePIE Most of the avalon related code is found here https://github.com/AndersMalmgren/FreePIE/blob/master/FreePIE.GUI/Shells/MainShellView.xaml Update after Sam's answer Its very, very little that needs to be done to enable

How do I automatically load a layout into my AvalonDock instance?

一曲冷凌霜 提交于 2019-12-09 06:55:02
问题 I have integrated AvalonDock 2.0 into my application. I've bound the document and anchor-able sources to my view-model which are rendered with the proper user controls via DataTemplate s. I can load and save layouts with the XmlLayoutSerializer . I need to support loading predefined layouts on demand (via Button s and ICommand s). That works as well. The thing I can't get working is loading a serialized layout automatically when the DockingManager is done loading the view-models and their

Dynamic horizontal/vertical split change with AvalonDock

∥☆過路亽.° 提交于 2019-12-08 06:57:02
问题 I have two areas on my interface (using WPF) that I want to be splitted. And a button to change between horisontal and vertical split. I'm using AvalonDock. When I change Orientation parameter in code before running it all works. <ad:DockingManager Grid.Row="1"> <ad:LayoutRoot> <ad:LayoutPanel x:Name="LayoutPanel1" Orientation="Vertical" IsMaximized="True"> <ad:LayoutDocumentPane x:Name="DocPane1" ShowHeader="True"> <ad:LayoutDocument Title="Spectrogram" CanClose="False" CanFloat="False">

Is it possible to prepare bindable MVVM anchorable panes both in main, footer and ride side window using Xceed AvalonDock

余生长醉 提交于 2019-12-08 05:36:14
问题 I am using AvalonDock control to accomplish bindable and dockable panes. I found great sample which alowed me do that. A few things are required to do that: I usedDock manager: <xcad:DockingManager Name="DockingManager" AnchorablesSource="{Binding FooterTools}" DocumentsSource="{Binding MainWindowTools}"> Prepare PanesTemplateSelectors, PanesStyleSelectors Everything looks great and enables me to prepare that solution using MVVM pattern. I would like to know how to extend that solution to

Setting the initial height for panel in Avalon dock

喜夏-厌秋 提交于 2019-12-08 04:48:10
问题 I am creating panels in code in this way: DockableContent dockableContent = CreateDockableContent<TView>(model); dockableContent.Show(_dockingManager, AnchorStyle.Bottom); How can I specify the initial height for that panel? The following doesn't work: dockableContent.Height = 400; or ResizingPanel.SetResizeHeight(dockableContent, new GridLength(400)); 回答1: Nagg, Setting the height of the panel only affects its appearance when floating. When it is docked, it is bound by the limits of Resizing

Is it possible to prepare bindable MVVM anchorable panes both in main, footer and ride side window using Xceed AvalonDock

六月ゝ 毕业季﹏ 提交于 2019-12-06 16:03:31
I am using AvalonDock control to accomplish bindable and dockable panes. I found great sample which alowed me do that. A few things are required to do that: I usedDock manager: <xcad:DockingManager Name="DockingManager" AnchorablesSource="{Binding FooterTools}" DocumentsSource="{Binding MainWindowTools}"> Prepare PanesTemplateSelectors, PanesStyleSelectors Everything looks great and enables me to prepare that solution using MVVM pattern. I would like to know how to extend that solution to accomplish following draft: I have two sources which I can use as a bindable sources: AnchorablesSource="