Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: 3.0.0 AvalonDock MVVM binding defect [22448]

$
0
0
Since version 3.0.0, the MVVM-Binding of AvalonDock seems to be defective.

When AvalonDock is bound (__AnchorablesSource__) to an __ObservableCollection__, changing this collection (Clearing it, specifically) raises a __NullPointerException__.

Example-Project attached.

Steps to reproduce (in the Example-Project):
- Start project
- Directly press button at the bottom of the window. (do not move / click the panels)

This works flawlessly with 2.9.0
Comments: ** Comment from web user: BoucherS **

Hi,

This is already fixed in v3.1.
In the meantime, you can do the following changes :
1) In file Xceed.Wpf.AvalonDock/Controls/LayoutItems.cs,
Add the following method :
```
internal bool IsViewExists()
{
return ( _view != null );
}
```

2) In file Xceed.Wpf.AvalonDock/DockingManager.cs
In method "RemoveViewFromLogicalChild"
Replace its content with :
```
if( layoutContent == null )
return;

var layoutItem = this.GetLayoutItemFromModel( layoutContent );
if( layoutItem != null )
{
if( layoutItem.IsViewExists() )
{
this.InternalRemoveLogicalChild( layoutItem.View );
}
}
```

――――
_Get more controls, features, updates and technical support with [Xceed Toolkit Plus for WPF](https://wpftoolkit.codeplex.com/wikipage?title=Compare%20Editions)_


Viewing all articles
Browse latest Browse all 4964

Trending Articles



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