GithubHelp home page GithubHelp logo

dirkster99 / avalondock Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 303.0 3.16 MB

Our own development branch of the well known WPF document docking library

License: Microsoft Public License

C# 99.78% Batchfile 0.22%
avalondock control csharp dark-theme dock docking docking-application docking-framework docking-library dotnet edi ide layout light light-theme mllib mvvm theme wpf wpf-document

avalondock's People

Contributors

amolf-se avatar bbuerger avatar bdachev avatar corytodd avatar dgosbell avatar dirkster99 avatar eriove avatar gonzru avatar jiiks avatar jogibear9988 avatar khaos66 avatar l45emy avatar lyonjack avatar madenaras avatar mgnslndh avatar mkonijnenburg avatar mpondo avatar muhahe avatar oatkins avatar oktrue avatar pkindruk avatar radvilesaveraitefemtika avatar rwg0 avatar ryanvs avatar scdmitryvodich avatar siegfriedpammer avatar stewienj avatar sukamoni avatar triman avatar wenveo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avalondock's Issues

Won't compile in VS2017

I get the following error list when compiling in VS2017:

Severity Code Description Project File Line Suppression State
Error CS0006 Metadata file 'E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.Expression\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Expression.dll' could not be found WinFormsTestApp E:\Visual Studio 2017\Projects\AvalonDock-master\source\WinFormsTestApp\CSC 1 Active
Error CS0006 Metadata file 'E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock\bin\Debug\Xceed.Wpf.AvalonDock.dll' could not be found WinFormsTestApp E:\Visual Studio 2017\Projects\AvalonDock-master\source\WinFormsTestApp\CSC 1 Active
Error CS0006 Metadata file 'E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.Aero\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Aero.dll' could not be found WinFormsTestApp E:\Visual Studio 2017\Projects\AvalonDock-master\source\WinFormsTestApp\CSC 1 Active
Error CS0006 Metadata file 'E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.Metro\bin\Debug\Xceed.Wpf.AvalonDock.Themes.Metro.dll' could not be found WinFormsTestApp E:\Visual Studio 2017\Projects\AvalonDock-master\source\WinFormsTestApp\CSC 1 Active
Error CS0006 Metadata file 'E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.VS2010\bin\Debug\Xceed.Wpf.AvalonDock.Themes.VS2010.dll' could not be found WinFormsTestApp E:\Visual Studio 2017\Projects\AvalonDock-master\source\WinFormsTestApp\CSC 1 Active
Error CS0006 Metadata file 'E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.VS2013\bin\Debug\Xceed.Wpf.AvalonDock.Themes.VS2013.dll' could not be found WinFormsTestApp E:\Visual Studio 2017\Projects\AvalonDock-master\source\WinFormsTestApp\CSC 1 Active
Error Error signing assembly -- Access is denied. Xceed.Wpf.AvalonDock E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock\ALINK
Error The tag 'BoolToVisibilityConverter' does not exist in XML namespace 'clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock'. Line 33 Position 4. Xceed.Wpf.AvalonDock.Themes.Aero E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.Aero\Theme.xaml 33
Error The tag 'BoolToVisibilityConverter' does not exist in XML namespace 'clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock'. Line 32 Position 6. Xceed.Wpf.AvalonDock.Themes.Expression E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.Expression\Theme.xaml 32
Error The tag 'BoolToVisibilityConverter' does not exist in XML namespace 'clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock'. Line 31 Position 4. Xceed.Wpf.AvalonDock.Themes.Metro E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.Metro\Theme.xaml 31
Error The tag 'BoolToVisibilityConverter' does not exist in XML namespace 'clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock'. Line 31 Position 4. Xceed.Wpf.AvalonDock.Themes.VS2010 E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.VS2010\Theme.xaml 31
Error The tag 'BoolToVisibilityConverter' does not exist in XML namespace 'clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock'. Line 34 Position 6. Xceed.Wpf.AvalonDock.Themes.VS2013 E:\Visual Studio 2017\Projects\AvalonDock-master\source\Components\Xceed.Wpf.AvalonDock.Themes.VS2013\Themes\Generic.xaml 34
Error The tag 'BoolToVisibilityConverter' does not exist in XML namespace 'clr-namespace:Xceed.Wpf.AvalonDock.Converters;assembly=Xceed.Wpf.AvalonDock'. Line 25 Position 14. MLibTest E:\Visual Studio 2017\Projects\AvalonDock-master\source\MLibTest\MLibTest\MainWindow.xaml 25
Error The tag 'DockingManager' does not exist in XML namespace 'clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock'. Line 58 Position 10. MVVMTestApp E:\Visual Studio 2017\Projects\AvalonDock-master\source\MVVMTestApp\MainWindow.xaml 58
Error The tag 'DockingManager' does not exist in XML namespace 'http://schemas.xceed.com/wpf/xaml/avalondock'. Line 66 Position 10. TestApp E:\Visual Studio 2017\Projects\AvalonDock-master\source\TestApp\MainWindow.xaml 66
Error The tag 'DockingManager' does not exist in XML namespace 'http://schemas.xceed.com/wpf/xaml/avalondock'. Line 6 Position 6. Xceed.Wpf.AvalonDock.Test E:\Visual Studio 2017\Projects\AvalonDock-master\source\AutomationTest\Xceed.Wpf.AvalonDock.Test\Views\AnchorablePaneTestWindow.xaml 6
Error XDG0008 The name "DockingManager" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 66
Error XDG0008 The name "DockingManager" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 70
Error XDG0008 The name "LayoutRoot" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 78
Error XDG0008 The name "LayoutPanel" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 79
Error XDG0008 The name "LayoutAnchorablePane" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 80
Error XDG0008 The name "LayoutAnchorable" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 81
Error XDG0008 The name "LayoutDocumentPaneGroup" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 85
Error XDG0008 The name "LayoutDocumentPane" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 86
Error XDG0008 The name "LayoutDocument" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 87
Error XDG0008 The name "LayoutDocument" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 93
Error XDG0008 The name "LayoutAnchorablePaneGroup" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 98
Error XDG0008 The name "LayoutAnchorablePane" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 99
Error XDG0008 The name "LayoutAnchorable" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 100
Error XDG0008 The name "LayoutAnchorable" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 106
Error XDG0008 The name "LayoutRoot" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 113
Error XDG0008 The name "LayoutAnchorSide" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 114
Error XDG0008 The name "LayoutAnchorGroup" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 115
Error XDG0008 The name "LayoutAnchorable" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 116
Error XDG0008 The name "LayoutAnchorable" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/avalondock". TestApp MainWindow.xaml 119

Anchorable Pane with reloaded layout cannot show again

Dear Dirk

When i reload a layout where anchorables are docked in the documentpane and then hide a anchorable pane, then this pane cannot be show again.

I can reproduce the same behavior in your Edi project.

  1. Add Explorer-Pane to the Documentpane
    image

  2. Close Edi

  3. Open Edi and hide the Explorer-Pane
    image

  4. Try to show the Explorer-Pane again.
    image

  5. Nothing happens.

Kind Regards
Martin

Layout document disappears between application sessions

  1. Go to MLibTest project.
  2. Comment in MainWindow.xaml.cs "stringLayoutSerializer.LayoutSerializationCallback += (s, e) =>..." and the following lines with event callback (lines 80-114). (This callback may be absent in real application and will not be called by LayoutSerializer in FixupLayout.)
  3. Compile the project.
  4. Go to compiled application folder and create AvalonDock.Layout.config file with the content of the attached file. Please note that it contains LayoutDocument element with ContentId applied.
  5. Run MLibTest.exe and close it without performing any actions.
  6. AvalonDock.Layout.config was updated and does not contain LayoutDocument.

Desired result: LayoutDocument element with ContentId sholud be kept between sessions.

AvalonDock.Layout.txt

Code

Project unavailable

Hi,

English is not my native language. Therefore, I apologize if I have not found a solution to my problem in closed issues. I'm not good at programming, so I don't know how to solve it.

I use VisualStudio 2017. I wanted to try AvalonDock, but unsuccessfully.
All Commits after "support netcore3" (Aug 31, 2019) report an error.
Bug

The old NullReferenceException comes back

Greetings,
I am currently using version 3.5.12 with net4.8 and I discovered a new version of the old bug in version 3.5.0 with floating anchorables and saving layouts.

further down is the ExceptionWindo.xaml and cs file attached, in which you can reproduce this error.
The main key here is using two dockingManagers for two separate sections within TabControl although I think it can be done with other "Hiding" WPF elements.

To reproduce the error, you have to open this application. detach one of the windows to a floating anchorable and then save the layout. You switch tabs then load the layout (nothing should visually happen) and then switch back to the old tab. Now there is not one but two floating anchorables, and one points to a weirdly null reference.

Correct me, if I am saving these layouts wrong,

<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" x:Class="ExceptionWindow.ExceptionWindow"
        mc:Ignorable="d"
        Title="Exception Window" Height="800" Width="1200">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="20"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Button x:Name="LoadButton" Content="Load Layout" Grid.Row="0" Grid.Column="0" Click="LoadButton_Click"/>
        <Button x:Name="SaveButton" Content="Save Layout" Grid.Row="0" Grid.Column="1" Click="SaveButton_Click"/>
        <TabControl SelectedIndex="0" Grid.Row="1" Grid.ColumnSpan="2">
            <TabItem Header="Tab 1">
                <xcad:DockingManager x:Name="dockingManager1" AllowMixedOrientation="True">

                    <xcad:LayoutRoot>

                        <xcad:LayoutPanel Orientation="Horizontal">


                            <xcad:LayoutAnchorablePaneGroup Orientation="Vertical" DockWidth="40*">

                                <xcad:LayoutAnchorablePane>

                                    <xcad:LayoutAnchorable ContentId="Window1" Title="Window 1" CanHide="False" CanAutoHide="False" CanFloat="True">

                                        <Grid></Grid>
                                    </xcad:LayoutAnchorable>
                                </xcad:LayoutAnchorablePane>

                                <xcad:LayoutAnchorablePane>
                                    <xcad:LayoutAnchorable ContentId="Window2" Title="Window 2" CanAutoHide="False" CanHide="True" CanClose="True">
                                        <Grid></Grid>
                                    </xcad:LayoutAnchorable>
                                </xcad:LayoutAnchorablePane>
                            </xcad:LayoutAnchorablePaneGroup>

                            <xcad:LayoutAnchorablePane DockWidth="60*">
                                <xcad:LayoutAnchorable ContentId="Window3" Title="Window 3" CanHide="True" CanAutoHide="False" CanClose="True">
                                    <Grid></Grid>
                                </xcad:LayoutAnchorable>
                            </xcad:LayoutAnchorablePane>

                        </xcad:LayoutPanel>
                    </xcad:LayoutRoot>
                </xcad:DockingManager>
            </TabItem>
            <TabItem Header="Tab 2">
                <xcad:DockingManager x:Name="dockingManager2" AllowMixedOrientation="True">
                    <xcad:LayoutRoot>
                        <xcad:LayoutPanel Orientation="Horizontal">
                            <xcad:LayoutAnchorablePane DockWidth="25*">
                                <xcad:LayoutAnchorable CanClose="False"  IsActive="True" CanHide="False" ContentId="Window4" Title="Window 4">
                                   <Grid></Grid>
                                </xcad:LayoutAnchorable>
                            </xcad:LayoutAnchorablePane>
                            <xcad:LayoutAnchorablePane DockWidth="75*">
                                <xcad:LayoutAnchorable CanClose="False" CanHide="False" CanAutoHide="False" ContentId="Window5" Title="Window 5">
                                   <Grid></Grid>
                                </xcad:LayoutAnchorable>
                            </xcad:LayoutAnchorablePane>
                        </xcad:LayoutPanel>
                    </xcad:LayoutRoot>
                </xcad:DockingManager>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
using System.Windows;
using Xceed.Wpf.AvalonDock.Layout.Serialization;

namespace ExceptionWindow
{
    /// <summary>
    /// Interaction logic for FrmMain.xaml
    /// </summary>
    public partial class ExceptionWindow : Window
    {

        private XmlLayoutSerializer docking1LayoutSerializer;
        private XmlLayoutSerializer docking2LayoutSerializer;

        public ExceptionWindow()
        {
            //Initialize General UI
            InitializeComponent();
            docking1LayoutSerializer = new XmlLayoutSerializer(dockingManager1);
            docking2LayoutSerializer = new XmlLayoutSerializer(dockingManager2);
        }

        private void LoadButton_Click(object sender, RoutedEventArgs e)
        {
            docking1LayoutSerializer.Deserialize("test-docking1.xml");
            dockingManager1 = docking1LayoutSerializer.Manager;

            docking2LayoutSerializer.Deserialize("test-docking2.xml");
            dockingManager2 = docking2LayoutSerializer.Manager;
        }

        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {

            docking1LayoutSerializer.Serialize("test-docking1.xml");
            docking2LayoutSerializer.Serialize("test-docking2.xml");

        }
    }
}

Floating Window Group does not hide correctly

Issue

A Floating Window (Group with at least 2 tool windows) does not hide correctly.

The framework hides only the toolwindows but leaves floating window empty.
There is a NullReference Exception + Crash when user tries to drag the flowting tool window.

Steps to verify (using the MLib_Test client)

  1. Drag 2 tool windows (LayoutAnchorable) into one floating window
    Crash CloseFloatingWindowGroup CloseButton Drag

  2. Close MLib_Test Application to Save the Layout

  3. Restart MLib_Test Application to Reload the Layout

  4. Click Hide (button) of the floating window
    Crash CloseFloatingWindowGroup CloseButton Drag_1

Bug

  • The empty floating window is still visible
  • Dragging the empty floating window leads to a crash
    AvalonDock.Layout.txt

Crash is reproducable with this layout but somehow not with above steps anymore(?):

AutoHide does not work with ScrollViewer

The AutoHide function does not work with controls that have a scrollviwer inside the controltemplate.

I have tested with MLibTest.

Step to reproduce:

  1. Start MLibTest
  2. Open New File
  3. Dock the Tool 3-Window to the right side and select Autohide.
  4. Open Tool3 Window
  5. Click inside New File
  6. The Tool3 Window does not disappear..

image

2nd Monitor restore LayoutAnchorablePaneGroup

Hi

Firstly wanted to say this a great branch of AvalonDock and big thank you for your continued efforts on fixing issues developers have found with the WPF toolkit version.

I have a issue I'm hoping you might be able to resolve. My application is using entirely tool windows Layout Anchorables.

I'm currently on version 3.5.4.1 and I can now restore layout anchorable floating window on a second monitor, and also now as maximised on 2nd monitor :-)

However, when I group the floating layout anchorables together as a maximised layout anchorable group, I am unable to restore this back to the 2nd monitor.

Would you be able to provide an update that can restore floating layout anchorable group on a 2nd monitor please?

Thanks

LayoutAnchorable not Closeable but "CanClose" is True

Another error with a LayoutAnchorable.

If I Dock a LayoutAnchorabel Above or Below, or Left or Right of a LayoutDocument, it gets uncloseable. If I undock ("I can close the dialog") and dock completely to the left, right,... it works as excpected

Hiding and showing anchorable in document's pane throws an exception

Steps to reproduce:

  1. Download this sample project: https://www.codeproject.com/KB/WPF/483507/Version_03_Edi_RecentFilesTW.zip
  2. Update AvalonDock version to 3.5.12.
  3. Drag 'Recent Files' anchorable window and drop it to the document's pane.
  4. Drag 'File Stats' anchorable window and drop it to the document's pane.
  5. Close 'File Stats' with X.
  6. Close 'Recent Files' with X.
  7. Choose 'Tools' from the menu and click 'RecentFiles'.
  8. It throws:
    System.InvalidCastException: 'Unable to cast object of type 'Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable' to type 'Xceed.Wpf.AvalonDock.Layout.ILayoutPanelElement'.'

Other exception:

  1. Repeat step 1-6.
  2. Choose 'Tools' from the menu and click 'Properties'.
  3. Repeat step 2.
  4. It throws:
    System.ArgumentOutOfRangeException: 'Index must be within the bounds of the List. Parameter name: index'

NullReferenceException while restoring layout with not existing document

Hi, im using your fork of AD with restore layout as described in this article

While restoring layout, there is possibility that XML layout will contains reference to document which isnt open (while restoring) and in previous version AD ignored it and opened rest of layout.
But in 3.5.6 version it throws NullReferenceException (shown below).

In LayoutContent.cs when it comes to restore not existing document Root.Manager is null (as shown on screenshot)

image

Is there a possibility how to skip restoring documents which are not opened? For restoring layout im using code you wrote on codeproject.com (link in top of issue). Full code example described bellow. I thought, that when i set e.Cancel to true in LayoutSerializationCallback, then layout restoring for this document will be canceled. Or am i missing something?

private void LoadDockingManagerLayout(DockingManager docManager)
        {
            String layoutFileName = Path.Combine(LayoutDir, LayoutFileName);
            layoutFileName = layoutFileName+ ".config";

            if (!File.Exists(layoutFileName))
            {
                return;
            }

            var layoutSerializer = new XmlLayoutSerializer(docManager);

            layoutSerializer.LayoutSerializationCallback += LayoutSerializer_LayoutSerializationCallback;

            try
            {
                layoutSerializer.Deserialize(layoutFileName);
            }
            catch (Exception ex)
            {

                Console.WriteLine("AD Layout deserialization failed: " + ex.ToString());
                //if loading layout fails, restore default layout
                ResetLayout();
            }
            layoutSerializer.LayoutSerializationCallback -= LayoutSerializer_LayoutSerializationCallback;
        }

        private void LayoutSerializer_LayoutSerializationCallback(object sender, LayoutSerializationCallbackEventArgs e)
        {
            // This can happen if the previous session was loading a file
            // but was unable to initialize the view ...
            if (e.Model.ContentId == null)
            {
                e.Cancel = true;
                return;
            }

            ReloadContentOnStartUp(e);
        }

        private void ReloadContentOnStartUp(LayoutSerializationCallbackEventArgs args)
        {
            string sId = args.Model.ContentId;

            // Empty Ids are invalid but possible if aaplication is closed with File>New without edits.
            if (string.IsNullOrWhiteSpace(sId) == true)
            {
             
```   args.Cancel = true;
                return;
            }

            args.Content = ReloadItem(args.Model);

            if (args.Content == null) { 
                args.Cancel = true;                
            }
        }

        private object ReloadItem(object item)
        {
            object ret = null;

            switch (item)
            {
                case LayoutAnchorable anchorable:    
                    //list of tools windows
                    ret = Manager.Tools.FirstOrDefault(i => i.ContentId == anchorable.ContentId);
                    break;
                case LayoutDocument document:
                    // list of restored documents
                    ret = Manager.Documents.FirstOrDefault(i => i.ContentId == document.ContentId);
                    break;
                default:
                    throw new NotImplementedException("Not implemented type of AD item ");
            }

            return ret;
        }


`System.NullReferenceException: Object reference not set to an instance of an object.
   at Xceed.Wpf.AvalonDock.Layout.LayoutContent.CloseInternal() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutContent.cs:line 872
   at Xceed.Wpf.AvalonDock.Layout.LayoutDocument.CloseDocument() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutDocument.cs:line 181
   at Xceed.Wpf.AvalonDock.Layout.Serialization.LayoutSerializer.FixupLayout(LayoutRoot layout) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Serialization\LayoutSerializer.cs:line 125
   at Xceed.Wpf.AvalonDock.Layout.Serialization.XmlLayoutSerializer.Deserialize(TextReader reader) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Serialization\XmlLayoutSerializer.cs:line 82
   at Xceed.Wpf.AvalonDock.Layout.Serialization.XmlLayoutSerializer.Deserialize(String filepath) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Serialization\XmlLayoutSerializer.cs:line 110
   at Skald.MVVM.QuestSystem.Controls.Docking.LayoutSaveLoadUtil.LoadDockingManagerLayout(DockingManager docManager) in C:\Workspaces\Skald_questSystemUI\Skald\MVVM\QuestSystem\Controls\Docking\LayoutSaveLoadUtil.cs:line 72`

Null Reference Exception inserting documents when isActive is set before insertion

Original Issue: #1481

I have an application using the AvalonDock library, and to fix an issue with new documents not showing content correctly (#1480), we have to set the IsActive property on the LayoutDocument to true in the BeforeInsertDocument method of the ILayoutUpdateStrategy implementation.

With this setup, the library throws a Null Reference Exception under these circumstances:

  1. Open enough new documents such that the tab headers fill the available width of the screen.
  2. The next document you open will be added at the start of the list instead of the end
  3. Click inside the document to give it focus
  4. Open another new document
  5. AvalonDock throws a Null Reference Exception

I have been able to produce a sample application that produces the same error; which is simply the DocumentOpenSample modified to set the IsActive property as described.

DocumentOpenSample.zip

The docked pane becomes not visible (overlapped)

Steps to reproduce:

  1. Set DockMinWidth="250" in <avalonDockLayout:LayoutAnchorablePane Name="ToolsPane" DockHeight="150"> in MainWindow.xaml in MLibTest.
    image
  2. Compile it and run without any config files.
  3. Dock the "File Stats" pane to the left side.
  4. Change the width of "File Stats" pane to minimum.
  5. Dock the "Color Picker" pane to the right side of "File Stats" pane.
    As result the "Color Picker" pane becomes invisible (overlapped).
    See the video:
    Video_2019-10-22_152250.zip

Seems like these changes introduced the issue: f7427b7

MVVM define AnchorSide in ViewModel

First of all I think this is not a bug - but more a question.

I am looking for a way to define the anchor side within my view model:

    <xcad:DockingManager Name="dock" Grid.Row="2" 
DataContext="{Binding MyViewModel}"
                     DocumentsSource="{Binding Documents}"
                     AnchorablesSource="{Binding Anchorables}" > 

Currently adding new view models to the "Anchorables" collection automatically shows up the new view on the right side. Is there a way to define the anchor side within the view model?

Tool tab header misalignment

As you can see, the tool "tab header" is in the wrong place:
Image

Where it should be:
Image

The same thing happens in all corners
This is quite annoying..
Is it possible to somehow fix that?

Store docking position in model

Hi Dirk,

this is not really an issue but more like a question. Not sure if you could help. I use the AvalonDock component in my MVVM application. Within the application I have bound my view models to the anchorable source like this:

<xcad:DockingManager Name="_dockingManager" Margin="5" Grid.Row="2" DataContext="{Binding DockingManagerViewModel}" DocumentsSource="{Binding Documents}" ActiveContent="{Binding Path=ActiveContent, Mode=TwoWay}" AnchorablesSource="{Binding Anchorables}">

So I can show new views dynamically by adding the corresponding model to the "Anchorables" collection. It is also possible to remove a view by removing the model from the collection. So the user can show and close views during the lifetime of the application. My problem is now - how can I store the last position of a view with the corresponding model to show it at the same place as before (in case a user shows a view, drags the view to another place and closes the view - after showing the view again, the view should appear on the last place as it was before). I know there is a layout load and save mechanism, but I want to store/restore location during the application lifetime. In addition the DockingManager itself has a LayoutChanged and LayoutChanging event which is also not really helpful in a MVVM application. Any ideas?

Installation parallel to Xceed

First of all thanks for the great work you did in your Avalon Dock branch. Currently I am using this implementation because of the fixed issues in your branch compared to the original Xceed branch. Now I am in a situation where I want to use some other controls from the original Xceed branch but the docking stuff from yours (some of my assemblies are still using the Nuget package from Xceed and one is using yours). All libraries are loaded via Nuget. Currently the assembly version is different 3.5.0.0 compared to 3.5.4.0 which is good but I think not really enough. Both assemblies have the same name which makes it impossible to do a xcopy deployment. Do you have a suggestions to handle this? I could compile your package myself and give the assembly a different name but then I loose all the advantages of Nuget.

How to Dock in Code

Hello Dirkster,

maybe you could help me.

Can you tell me, how it is possible to Dock a new LayoutAnchorable in Code (not MVVM)?

InvalidOperationException when deserializing layout

Hi,
when attempting to deserialize a saved layout from XML, I get the following exception:

System.InvalidOperationException: 'Collection was modified; enumeration operation may not execute.'

It seems to be reproducable by moving or removing a LayoutAnchrablePane that is contained within the serialized layout and then deserializing the layout.

Here is the deserialization code:

var serializer = new XmlLayoutSerializer(dockingManager); serializer.LayoutSerializationCallback += SerializerLayoutSerializationCallback; [...] using (var stream = new StreamReader(defaultLayout)) { serializer.Deserialize(stream); }

(The exception is thrown somewhere inside serializer.Deserialize(stream);)

StackTrace:

at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List1.Enumerator.MoveNextRare() at System.Collections.Generic.List1.Enumerator.MoveNext()
at Xceed.Wpf.AvalonDock.Layout.Extensions.d__0.MoveNext() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Extentions.cs:line 32
at Xceed.Wpf.AvalonDock.Layout.Extensions.d__0.MoveNext() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Extentions.cs:line 35
at Xceed.Wpf.AvalonDock.Layout.Extensions.d__0.MoveNext() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Extentions.cs:line 35
at Xceed.Wpf.AvalonDock.Layout.Extensions.d__0.MoveNext() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Extentions.cs:line 35
at Xceed.Wpf.AvalonDock.Layout.Extensions.d__0.MoveNext() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Extentions.cs:line 35
at Xceed.Wpf.AvalonDock.Layout.Extensions.d__0.MoveNext() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Extentions.cs:line 35
at System.Linq.Enumerable.d__951.MoveNext() at Xceed.Wpf.AvalonDock.DockingManager.Layout_ElementAdded(Object sender, LayoutElementEventArgs e) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\DockingManager.cs:line 2976 at Xceed.Wpf.AvalonDock.Layout.LayoutRoot.OnLayoutElementAdded(LayoutElement element) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutRoot.cs:line 763 at Xceed.Wpf.AvalonDock.Layout.LayoutElement.OnRootChanged(ILayoutRoot oldRoot, ILayoutRoot newRoot) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutElement.cs:line 136 at Xceed.Wpf.AvalonDock.Layout.LayoutElement.set_Parent(ILayoutContainer value) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutElement.cs:line 68 at Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.UpdateParentVisibility() in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutAnchorable.cs:line 769 at Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable.OnParentChanged(ILayoutContainer oldValue, ILayoutContainer newValue) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutAnchorable.cs:line 270 at Xceed.Wpf.AvalonDock.Layout.LayoutElement.set_Parent(ILayoutContainer value) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutElement.cs:line 64 at Xceed.Wpf.AvalonDock.Layout.LayoutGroup1._children_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutGroup.cs:line 253
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection1.Remove(T item) at Xceed.Wpf.AvalonDock.Layout.LayoutGroup1.RemoveChild(ILayoutElement element) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutGroup.cs:line 137
at Xceed.Wpf.AvalonDock.DockingManager.DetachAnchorablesSource(LayoutRoot layout, IEnumerable anchorablesSource) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\DockingManager.cs:line 2917
at Xceed.Wpf.AvalonDock.DockingManager.OnLayoutChanged(LayoutRoot oldLayout, LayoutRoot newLayout) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\DockingManager.cs:line 147
at Xceed.Wpf.AvalonDock.DockingManager.OnLayoutChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\DockingManager.cs:line 127
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Xceed.Wpf.AvalonDock.Layout.Serialization.XmlLayoutSerializer.Deserialize(TextReader reader) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\Serialization\XmlLayoutSerializer.cs:line 82
at Alpine.Gui.TestSuite.TestSuiteWindow.LoadDefaultLayout(Object sender, RoutedEventArgs e) in D:#ATAT3\Alpine.Atat\src\Core\Alpine.Gui\TestSuite\TestSuiteWindow.xaml.cs:line 389
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

I added the layout I am trying to deserialize:
layout.zip

Kind Regards,
David

Can hide LayoutAnchorable using Alt+F4 when CanHide is false

  1. As described in title, pressing Alt+F4 on floating mode hiding element even if CanHide is false.
    xceedsoftware/wpftoolkit#1516

  2. Avoid NullReferenceException() in DockingManager.GetFloatingWindowsByZOrder() by checking ctrl.Model.Root != null before accessing Manager:

      if( ctrl != null && ctrl.Model.Root != null && ctrl.Model.Root.Manager == this )
        yield return ctrl;
  1. Test Case
    • Create 2 documents via File > New
    • drag one document into a FloatingWindow position and select Close All But this from drop down menu of FloatingDocumentWindow
    • Bug: System.ArgumentOutOfRangeException: 'Index must be within the bounds of the List.
      in DocumentPaneDropTargets
      in case DropTargetType.DocumentPaneDockInside:
      At about Line 225 ...paneModel.Children.Insert( i, sourceModel );
      ย 
      Fixed with:
      paneModel.Children.Insert( Math.Min(paneModel.Children.Count, i), sourceModel );

Review Fix in this branch
https://github.com/Dirkster99/AvalonDock/tree/FloatingWindowCanHideFix

DockingManager: ModelChange event happens before new LayoutDocumentItem is added

Originally reported by https://github.com/striveprover

xceedsoftware/wpftoolkit#1430

When switched our project from .Net framework 4.6.1 to 4.7.2, the ApplyStyleToLayoutItem routine in Xceed.Wpf.AvalonDock.DockingManager causes a ModelChange event. Handling the event requires that the new LayoutDocumentItem is in the DockingManager's _layoutItems list. Unfortunately, the new LayoutDocumentItem is only added after ApplyStyleToLayoutItem completes.

The handler for ModelChange event in LayoutDocumentTabItem fails to set LayoutItem property and its CloseCommand no longer executes. Also, the item appears blank. Deselecting and reselecting allows its content to show, but does not fix the CloseCommand.

To be clear, we switched the .Net framework only in our projects and not in the Avalon dock project.

The fix appears to be to re-order the two lines (in two places) in Xceed.Wpf.AvalonDock.DockingManager.cs as shown below.

   _layoutItems.Add( layoutItem );
  ApplyStyleToLayoutItem( layoutItem );

"Close All" command text is not taken from Resources in AvalonDockThemeVs2013

Hi,
Thank you for the great work. It has been a great help for my work with all the bug fixes.
I came across this issue in the Generic.xaml file of Xceed.Wpf.AvalonDock.Themes.VS2013, where the MenuItem for Close All Documents doesnt take the text from the Resources. Instead, it has a hard-coded "Document CloseAll". The functionality works perfectly fine, but it's missing the correct corresponding text.
Adding a screenshot of the source code.
image
Thank you once again.

Always update floating properties

Case A. LayoutFloatingWindowControl does not always update floating properties of child elements when its size was changed. Sometimes (like after setting LayoutFloatingWindowControl.SizeToContent property) it's necessary to reset them explicitely.
Steps to reproduce:

  1. Go to MLibTest project.
  2. Replace code in MainWindow.xaml.cs with the code applied [MainWindow.xaml.cs.1.txt].
  3. Compile the project.
  4. Remove AvalonDock.Layout.config file from the application folder.
  5. Run the application.
  6. Undock bottom panel.
  7. Find created AvalonDock.Layout.config in application folder. Please note that FloatingWidth and FloatingHeight stored in configuration file are different from real sizes of these elements and of undocked panel size.

Case B. Currently AvalonDock does not inform application that uses this library about updates of FloatingHeight/FloatingWidth. So, it's not possible to correctly store these properties between sessions and restore them.
Steps to reproduce:

  1. Go to MLibTest project.
  2. Make FloatingWindowContentHost class public (for test simplicity).
  3. Replace code in MainWindow.xaml.cs with the code applied [MainWindow.xaml.cs.2.txt].
  4. Compile the project.
  5. Remove AvalonDock.Layout.config file from the application folder.
  6. Run the application.
  7. Undock bottom panel.
  8. Set focus to Color picker tab.
  9. Change floating window width/height. Please note that FileStats.SizeChanged event is not called and text exception is not thrown.

MainWindow.xaml.cs.1.txt
MainWindow.xaml.cs.2.txt

AutoHide lag

Hello,

I launched the test project.

If a window is in autohide mode, it takes some noticeable time to hide when another window is clicked.

Thank you.

Dispatcher Suspend Exception Issue

In our application when we change the theme we have to reload the application layout. If we change the theme several times - we have the following exception:

System.InvalidOperationException: Cannot perform this operation while dispatcher processing is suspended.
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at Xceed.Wpf.AvalonDock.Controls.FocusElementManager.SetupFocusManagement(DockingManager manager)
   at Xceed.Wpf.AvalonDock.DockingManager.DockingManager_Loaded(Object sender, RoutedEventArgs e)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

LayoutAnchorable.IsActive property is not working

Steps to reproduce:

  1. Clone https://github.com/silviubogan/cs-extended-wpf-test-1
  2. Start the program
  3. Make the Data Grid the active tab by clicking on it
  4. Click on the button at the top of the window
  5. The Flow View tab should be active but the Data Grid is instead

I tested this with 3.5.0 (the version part of the Extended WPF Toolkit) and the same happens.

I've read this page but I did not find something useful.

The relevant part of the program, after the part which deserializes some XML with a changed layout:

var la = MyDockingManager.FindName("MyFlowViewAnchorable") as Xceed.Wpf.AvalonDock.Layout.LayoutAnchorable;

Dispatcher.BeginInvoke(new Action(() =>
{
    la.IsActive = true;
}));

No exception is thrown, no error is shown.

Thank you.

AvalonDock: Unable to configure anchorable to disallow user to move it to the document pane

xceedsoftware/wpftoolkit#1460

It is not possible to setup anchorable in a way that dissallows user to drag/move it to the document pane.

Hi,
The LayoutAnchorable.CanDockAsTabbedDocument can be set to false to prevent the contextMenu from enabling the "Dock as Tabbed document" option.
But yes, a drag and drop is still possible. This will be fixed in v3.9.

A possible fix for this problem can be found in an extra branch:
https://github.com/Dirkster99/AvalonDock/tree/Issue18

I wonder if anyone has an opinion on this fix or whether I am missing something crucial? Would someone be up for a 4 eyes commit and independent testing?

AvalonDock PanesTemplateSelector is ignored

Issue

My LayoutItemTemplateSelector SelectTemplate() method won't fire at all anymore.
Tried to change the TemplateSelector from a StaticResource to a Bindable object to pure XAML, but nothing worked. The ContentPresenter of a LayoutAnchorableControl is always a TextBlock.

My layout consists only of Anchorables.
issue

Bug fix for xceedsoftware/wpftoolkit#1440

Replace 'Binding LayoutItem.View.Content' with 'Binding LayoutItem.View'
in Line 842 and 959 in generic.xaml

As shown in this commit:
fe18e81

After fix applied:
fix

How to force apply a language

Hi, I wonder how to set the controls menu language to Chinese without considering the language of my .Net framework?
Thank you!

AvalonDock for .Net Core 3

Hello,

Is there any plan to port AvalonDock to .Net Core 3 (which is WPF supported)?
Currently .Net Core 3 stage is preview6, and it will release at 2019/09.

I have tried to modify .sln and .csproj for .Net Core 3 by creating a whole new .Net Core 3 WPF library project with <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> (new format .csproj). It almost can be compiled perfectly, just only remove some Xceed related compiling/project parameters.

In other way, I have tried to use current .NET 4.6.1 version nuget dll to .Net Core 3 preview WPF Desktop project. It works!! Only the docking visual indicator pictures are shifted to right-down position, not on the center normally.

In fact, you can parallel compile two version DLLs for .Net Framework and .Net Core 3 by setting library .csproj with <TargetFrameworks>net461;netcoreapp3.0</TargetFrameworks>.

Floating Window Title Flashing

Hi,
I am using your fork of the AvalonDock framework (by the way - thanks for fixing all the annoying bugs :-)). Now when I undock a window to make it floating I can see a lot of flashing/flicker in the window title when I resize the window. Is it some wrong configuration on my side or is this the default behavior?

DockWidth and DockHeight not working

DockWidth and DockHeight Property do not working

And the symptoms are the same as the link below.
xceedsoftware/wpftoolkit#1297

The xaml structure of my project is as follows.

<LayoutDocumentPaneGroup DockWidth="200px">
    <LayoutAnchorable/>
</LayoutDocumentPaneGroup>

<LayoutDocumentPaneGroup DockWidth="1*">
    <LayoutAnchorable/>
</LayoutDocumentPaneGroup>

Window handle does not change on un-dock, event for float window locationchange

Hello.
I am building a dashboard like solution with AvalonDock, it is using MVVM model to place UserControls inside LayoutContainers, one type attaches view from external application to create overlay in content area (win32.SetParent), i am using a simple code to get handle of the window:
var handle = new WindowInteropHelper(Window.GetWindow(this)).EnsureHandle();
While layout is docked it works fine, but once anchorable is undocked into floating mode things break down - how can i get float window handle so i can place overlay into that window ?

Secon issue: once floating window is moved there is no way to detect it via event ? I have looked into DockManager.LayoutUpdated but that updates only on layout changes, not window movement ?

Resize behavior of anchorable panels, the case when panels are not visible

We have a case when document panel becomes hidden outside of the window.
Please, check the attached video for more details:
AvalonDock_fixedAnchorablePanelBehavior.zip

  1. Add additional tools panel FileStats2.
  2. Dock tools panel FileStats to left side and FileStats2 to the right side.
  3. Start decrease width of main window.
    As result: the document panel start to decreasing, after it reach DockMinValue, the tool panel in right FileStats2 start hiding under the window border.

Is there any way if we can make behavior of docked anchorable window in same way as in VisualStudio for example (see video).
Here in first order decrease Document Panel and then start to decreasing the tool panels.

System.ArgumentOutOfRangeException in LayoutAnchorableTabItem.OnMouseEnter line 189

Received following issue:

Top-level Exception Type: System.ArgumentOutOfRangeException Message: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Source: mscorlib Stack Trace: at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) at System.Collections.Generic.List1.get_Item(Int32 index)
at System.Collections.ObjectModel.Collection1.get_Item(Int32 index) at System.Collections.ObjectModel.ObservableCollection1.MoveItem(Int32 oldIndex, Int32 newIndex)
at Xceed.Wpf.AvalonDock.Layout.LayoutGroup1.MoveChild(Int32 oldIndex, Int32 newIndex) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Layout\LayoutGroup.cs:line 116 at Xceed.Wpf.AvalonDock.Controls.LayoutAnchorableTabItem.OnMouseEnter(MouseEventArgs e) in F:\MyFiles\CSharp\00_GitHub\Avalondock\source\Components\Xceed.Wpf.AvalonDock\Controls\LayoutAnchorableTabItem.cs:line 189 at System.Windows.UIElement.OnMouseEnterThunk(Object sender, MouseEventArgs e)

Its a sporadic issue, which occurs when there is some load in our application.

We applied a hotfix with prechecking the indexes before executing containerPane.MoveChild

if (newindex < containerPane.ChildrenCount && oldIndex > -1) { containerPane.MoveChild(oldIndex, newindex); }

Disappearring content when re-anchored

Hi,

When a LayoutAnchorable is AutoHidden then anchored, the content disappears. This issue appears when using a VS2013 theme (default avalonDock MetroTheme does not produce the issue)
Theme issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.