Quantcast
Channel: AvalonDock
Viewing all 2690 articles
Browse latest View live

New Post: [Version 2.0] Move Control between multiple DockingManagers (Reusing same control)

$
0
0
That is what I though - but dockingManager does not seem to have an obvious location where all the layoutAnchorables are located.
At least in 2.0 there is no dockingManager1.Items collection.

Even after closing the layout and setting content to null - there is a dependency link remaining between the dockingManager and the control. Also the existing parent of the control is still the docking manager. I cannot find where to disconnect this link. That is the problem.
thanks

Source code checked in, #102188

Edited Issue: Corner of floating windows is hard to pick [15837]

$
0
0
If I have a floated window and try to resize with the bottom right corner, it's quite difficult to grab it - I think the grab area should be increased. (The grab area on floating windows in Visual Studio is much larger)

Edited Issue: Loaded event fired twice on an UserControl inside docking manager [15781]

$
0
0
To reproduce:

1) click on portfolio button
2) the portfolio view is activated
3) first event Loaded of the usercontrol MyCustomControl with parent window null
4) second event loaded of the usercontrol MyCustomControl with parent window set correctly to PMVVM.MainWindow

I need to receive only one time the Loaded event with the right parent window set, this seen not to be a problem in the sample application, but in my application this lead to severals problems.

Is there any way to fix it?

Edited Issue: Loading twice the controls, the first time parent window null [15753]

$
0
0
In my test application I see that the controls inside a document are loaded twice and the first time the parent window is null, the problem is derived from the changset 95821 with the modification of the code in the loaded function of the DockingManager.
To reproduce the issue:
1) run the sample application
2) click on the portfolio button (and there is shown a message when the control inside the document is loaded - the first time with the parent window null and the second ok)
3) click on the stock quotes button to change the page
4) click on the portfolio button and the problem is shown again

in this application there is no big problem about this but in my application is more complex and it create great problems to have the first time loaded the parent window null, is there any fix possible to have the loaded event called only one time when the control is really rendered and his parent window is ok?

Edited Issue: [AvalonDock 2.0] - Reloading layout item cannot be cancelled on error [15758]

$
0
0
I am saving and re-loading open documents when the application ends and starts
and I found no way to cancel re-loading a specific file when the application starts.
Cancelling should be possible, because a file may not exist on application start or there
may be any kind of error signalled by the viewmodel load function.

What I miss is a return parameter that lets the sender know that this item is to be skipped
for re-load (as outline further below with e.Cancel in the code).

I was able to verify this also with earlier builds of the AvalonDock.MVVMTestApp through:

- Loading a file
- Saving the layout
- Exit AvalonDock.MVVMTestApp

- Rename the file (in Windows files system) that I previously loaded in AvalonDock.MVVMTestApp
- Re-start AvalonDock.MVVMTestApp

Issue:
There was an empty document dock control (just a tab item but no content)

In the current build 97076 saving and re-loading the layout does no longer
work with the AvalonDock.MVVMTestApp (even without renaming the file) -
I see that the LayoutSerializationCallback is commented out(?).

Re-loading non-existing file cannot be cancelled
------------------------------------------------------------------------------
var layoutSerializer = new XmlLayoutSerializer(mainWin.dockManager);

layoutSerializer.LayoutSerializationCallback += (s, e) =>
{
if (e.Model.ContentId == FileStatsViewModel.ToolContentId)
e.Content = Workspace.This.FileStats;
else
if (e.Model.ContentId == RecentFilesViewModel.ToolContentId)
e.Content = Workspace.This.RecentFiles;
else
{
if (workSpace.Config.ReloadOpenFilesOnAppStart == true)
{
if (!string.IsNullOrWhiteSpace(e.Model.ContentId) &&System.IO.File.Exists(e.Model.ContentId))
{
e.Content = Workspace.This.Open(e.Model.ContentId);
}
// else
// e.Cancel = true;
}
}
};

layoutSerializer.Deserialize(layoutFileName);
------------------------------------------------------------------------------

Edited Unassigned: [Version 2.0] Move Control between multiple DockingManagers (Reusing same control) [16229]

$
0
0
From discussion
https://avalondock.codeplex.com/discussions/445523

Closing a LayoutAnchorable doesn't seems to remove its content from the visual tree.

-=-=-=-=-=-=
I have an application with __two docking managers__.
First I am adding Control1 is added to the dockingManager1 . At a later time I want to __move Control1 from dockingManager1 to dockingManager2__ . I can't figure out how. I get the exception
> Specified element is already the logical child of another element. Disconnect it first


My Code for adding initially is -
```
layoutAnchorable = new LayoutAnchorable() { ContentId = "Help", Title = "Help", Content = Control1, };
layoutAnchorable.AddToLayout(dockingManager1, AnchorableShowStrategy.Top);

```
-------------------------------------------------------------------------------

To move later I tried -
```
layoutAnchorable.Close();
layoutAnchorable.Content = null;

LayoutAnchorable newLayoutAnchorable = new LayoutAnchorable() { ContentId="Help", Title = "Help", Content = Control1 };
newLayoutAnchorable.AddToLayout(dockingManager2, AnchorableShowStrategy.Top);

```
Whatever I do - it gives the same exception. __Note:__ I want to use the same control - not create a new instance. What do I have to do - to have the control removed from dockingManager1 's dependency tree completely.

thanks,
V

Commented Unassigned: [Version 2.0] Move Control between multiple DockingManagers (Reusing same control) [16229]

$
0
0
From discussion
https://avalondock.codeplex.com/discussions/445523

Closing a LayoutAnchorable doesn't seems to remove its content from the visual tree.

-=-=-=-=-=-=
I have an application with __two docking managers__.
First I am adding Control1 is added to the dockingManager1 . At a later time I want to __move Control1 from dockingManager1 to dockingManager2__ . I can't figure out how. I get the exception
> Specified element is already the logical child of another element. Disconnect it first


My Code for adding initially is -
```
layoutAnchorable = new LayoutAnchorable() { ContentId = "Help", Title = "Help", Content = Control1, };
layoutAnchorable.AddToLayout(dockingManager1, AnchorableShowStrategy.Top);

```
-------------------------------------------------------------------------------

To move later I tried -
```
layoutAnchorable.Close();
layoutAnchorable.Content = null;

LayoutAnchorable newLayoutAnchorable = new LayoutAnchorable() { ContentId="Help", Title = "Help", Content = Control1 };
newLayoutAnchorable.AddToLayout(dockingManager2, AnchorableShowStrategy.Top);

```
Whatever I do - it gives the same exception. __Note:__ I want to use the same control - not create a new instance. What do I have to do - to have the control removed from dockingManager1 's dependency tree completely.

thanks,
V
Comments: ** Comment from web user: emartin **

I was on the steps of resolvig the problem.
There is a commented line in DockingManager in this method:

DockingManager.CollectLayoutItemsDeleted()

The commented line remove the anchorable content from the dockingmanager logical children. I absolutely don't know why Adospace commented this line. It was initaly checked in as is.
But it is only part of the story.

1. You also need to get rid of the "LayoutElement._root" field, which is some kind of a cache to the "Root" dynamic property. Just call "Root" instead of refering the "_root" field.

2.
DockingManager.CollectLayoutItemsDeleted() "Dispatch" the execution of the cleanup. Removing the "dispatching" operation and simply do the cleanup at once resolve your problem, but re-add an old one. The reason why Adospace checked in this "dispatch" is to fix the issue explained in [this discussion](http://avalondock.codeplex.com/discussions/399931). So to avoid to re-insert an old problem to fix a new one, I was studying a way to fix this old issue without "dispatching" the execution in this method. Not complete yet.


Commented Issue: [AvalonDock 2.0.1363] Maximized info not stored in layout [15500]

$
0
0
Steps to reproduce:
- drag a pane to a second monitor.
- maximize that pane.
- save layout.
- load layout.
Pane is now correct on the second monitor, but it isn't maximized.
Comments: ** Comment from web user: emartin **

Unfortunately, Issue 16029 is not resolve by this fix.

New Post: [Version 2.0] Move Control between multiple DockingManagers (Reusing same control)

$
0
0
I have added a followup on this in the issue.

New Post: [Version 2] Floating document causes docked document to show blank

$
0
0
Hi,

I'm currently seeing this problem (does not happen ALL the time, but most time), is when I have documents in my DockingManager. DocumentsSource is binded.

The issue is, sometimes when i undock one of the documents, (either floating or side by side), and have focus on the Floated document, the docked document becomes blanked and vice versa. This is a problem now because undocking becomes useless as I cannot see both item as once.

This also occurs for side by side documents in the same manager.

Has anyone also seen this issue?

Thanks and Regards,
Kev

New Post: [Version 2.0] Focus and buttons

$
0
0
Unfortunately the problem is still not solved. It works for the above example, but it can be easily reproduced in the "AvalonDock.TestApp".
  • Start the "TestApp"
  • In the left tool window "WinForms Window" click in the first/upper textbox. The cursor is now in the textbox
  • Click in the textbox "Document 1 Content" in "Document 1". You already see that the focus immediately changes back to the left tool window
  • Click the button "Click to add 2 documents". Button looks like it is being clicked, but nothing happens. Focus stays in the left tool window

Commented Issue: [Version 2.0] Focus problem with buttons [15976]

$
0
0
Hi all,

it seems that there is an general problem with setting the focus on controls. If you can have a look on this disussion: http://avalondock.codeplex.com/discussions/428054 you will find a small example application which demonstrates the problem.
After some time of investigation I found the problem. It is caused inside of the FocusElementManager class in Method SetFocusOnLastElement. If I comment out line number 158 the focus problem don't appear anymore. It seems that it only appears if you have some focusable elements in your pane like textboxes or scrollviewers.

if (_modelFocusedElement.GetValue(model, out objectToFocus))
{
//focused = objectToFocus == Keyboard.Focus(objectToFocus);
}

I know it's not a real fix. Just a workaround and I have no clue about the side effects. Maybe the developer can have a deeper look into this issue and release a real patch for this problem.
Comments: ** Comment from web user: wyssp **

Unfortunately the problem is still not solved. It can be easily reproduced in the "AvalonDock.TestApp".

- Start the "TestApp"
- In the left tool window "WinForms Window" click in the first/upper textbox. The cursor is now in the textbox
- Click in the textbox "Document 1 Content" in "Document 1". You already see that the focus immediately changes back to the left tool window
- Click the button "Click to add 2 documents". Button looks like it is being clicked, but nothing happens. Focus stays in the left tool window

Commented Issue: [Version 2.0] Focus problem with buttons [15976]

$
0
0
Hi all,

it seems that there is an general problem with setting the focus on controls. If you can have a look on this disussion: http://avalondock.codeplex.com/discussions/428054 you will find a small example application which demonstrates the problem.
After some time of investigation I found the problem. It is caused inside of the FocusElementManager class in Method SetFocusOnLastElement. If I comment out line number 158 the focus problem don't appear anymore. It seems that it only appears if you have some focusable elements in your pane like textboxes or scrollviewers.

if (_modelFocusedElement.GetValue(model, out objectToFocus))
{
//focused = objectToFocus == Keyboard.Focus(objectToFocus);
}

I know it's not a real fix. Just a workaround and I have no clue about the side effects. Maybe the developer can have a deeper look into this issue and release a real patch for this problem.
Comments: ** Comment from web user: emartin **

This is probably due to the "WinForm" -> "WPF" interaction and be considered as a different Issue. Can you reproduce the issue in a pure WPF sample ?

Commented Issue: [Version 2.0] Focus problem with buttons [15976]

$
0
0
Hi all,

it seems that there is an general problem with setting the focus on controls. If you can have a look on this disussion: http://avalondock.codeplex.com/discussions/428054 you will find a small example application which demonstrates the problem.
After some time of investigation I found the problem. It is caused inside of the FocusElementManager class in Method SetFocusOnLastElement. If I comment out line number 158 the focus problem don't appear anymore. It seems that it only appears if you have some focusable elements in your pane like textboxes or scrollviewers.

if (_modelFocusedElement.GetValue(model, out objectToFocus))
{
//focused = objectToFocus == Keyboard.Focus(objectToFocus);
}

I know it's not a real fix. Just a workaround and I have no clue about the side effects. Maybe the developer can have a deeper look into this issue and release a real patch for this problem.
Comments: ** Comment from web user: funzl **

I still have the problem. There is a WinFormsHost embedded in the document control. but the host never get focused. I set the focus to a textbox in the tool control and try to click a button in the document control outside of the FormsHost. So I need to click this button twice to execute the action.


New Post: [Version 2.0] Initialization Issue

$
0
0
Hi everyone,

I am having an issue where my application launches without issue when run as a separate process, but when it is launched through COM interop, the application fails with a cryptic System.Windows.Markup.XamlParseException error.

If, however, I remove the following code from the XAML of my main window, the application launches fine both as a separate process and through COM interop, but I cannot control my layout.
<avalonDock:LayoutRoot>
                <avalonDock:LayoutPanel Orientation="Vertical">
                    <avalonDock:LayoutDocumentPane>
                    </avalonDock:LayoutDocumentPane>
                    <avalonDock:LayoutAnchorablePane DockHeight="200">
                    </avalonDock:LayoutAnchorablePane>
                </avalonDock:LayoutPanel>
            </avalonDock:LayoutRoot>
When stepping through the application with a debugger, the exception occurs stepping out of the (empty) default constructor for the LayoutPanel class.

The inner exception from the exception is below.
   at System.Windows.Baml2006.Baml2006SchemaContext.ResolveBamlType(BamlType bamlType, Int16 typeId)
   at System.Windows.Baml2006.Baml2006SchemaContext.GetXamlType(Int16 typeId)
   at System.Windows.Baml2006.Baml2006SchemaContext.GetProperty(Int16 propertyId, Boolean isAttached)
   at System.Windows.Baml2006.Baml2006Reader.Process_ContentProperty()
   at System.Windows.Baml2006.Baml2006Reader.Process_OneBamlRecord()
   at System.Windows.Baml2006.Baml2006Reader.Process_BamlRecords()
   at System.Windows.Baml2006.Baml2006Reader.Read()
   at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector)
   at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)"  string
Hopefully, someone here has seen this before and has an idea as I have so-far been unable to solve it. Thanks!

Commented Issue: [Version 2.0] CanClose and CanHide not works right on LayoutAnchorable [15234]

$
0
0
In the LayoutDocument can be used only the CanClose property, if this property is False, it's not possible to close this document (there isn't the menu item in the context menu and there isn't the x button on the tab folder).
The LayoutAnchorable has the CanClose and CanHide property, I expected that setting CanClose="False" the panel and flyoutWindow has the same behaviour of the document, but this delete only the close menu item from the context menu, but the X close command remain on the title bar of the Anchorable panel or flyout Window.
Setting the CanHide=False I expected to hide the AutoHide functionality (the autohide menu item of the context menu and the AutoHide pin from the panel and flyout window) but in this case it delete the X close button !??!?!
Comments: ** Comment from web user: wyssp **

I think you also need to fix the templates!

See line 780 in VS2010/Theme.xaml

Commented Issue: [Version 2.0] CanClose and CanHide not works right on LayoutAnchorable [15234]

$
0
0
In the LayoutDocument can be used only the CanClose property, if this property is False, it's not possible to close this document (there isn't the menu item in the context menu and there isn't the x button on the tab folder).
The LayoutAnchorable has the CanClose and CanHide property, I expected that setting CanClose="False" the panel and flyoutWindow has the same behaviour of the document, but this delete only the close menu item from the context menu, but the X close command remain on the title bar of the Anchorable panel or flyout Window.
Setting the CanHide=False I expected to hide the AutoHide functionality (the autohide menu item of the context menu and the AutoHide pin from the panel and flyout window) but in this case it delete the X close button !??!?!
Comments: ** Comment from web user: emartin **

Thanks for your cue! We will address this.

Created Unassigned: Missing highlight of floating document [16250]

$
0
0
When a floating document is focused its not highlighted properly. I'm not sure if it's only when using the VS2010Theme, but its easy to spot when using that theme (i.e, it stays gray, it does not get orange).

Commented Unassigned: Missing highlight of floating document [16250]

$
0
0
When a floating document is focused its not highlighted properly. I'm not sure if it's only when using the VS2010Theme, but its easy to spot when using that theme (i.e, it stays gray, it does not get orange).
Comments: ** Comment from web user: mgnu **

It worked in revision 98289

Viewing all 2690 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>