i have the following scenario (RadDocking with three panes and on the third pane is a PRISM region) :
<
Grid
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
>
<
Telerik:RadDocking
Name
=
"Docking"
UI:PaRadDockingExtensions.IsEnabled
=
"True"
ItemContainerStyle
=
"{DynamicResource PaNewRadDockPaneStyle}"
AllowUnsafeMode
=
"True"
>
<
Telerik:RadDocking.DocumentHost
>
<
Telerik:RadSplitContainer
Orientation
=
"Vertical"
>
<
Telerik:RadPaneGroup
Name
=
"MapGroup"
>
<
Telerik:RadPane
Header
=
"Pane1"
Telerik:RadDocking.SerializationTag
=
"C1"
>
<
AlapModul:CikkInputView
DataContext
=
"{Binding}"
/>
</
Telerik:RadPane
>
<
Telerik:RadPane
Header
=
"Pane2"
Telerik:RadDocking.SerializationTag
=
"C2"
>
<
AlapModul:CikkKiegeszitoInputView
DataContext
=
"{Binding}"
/>
</
Telerik:RadPane
>
<
Telerik:RadPane
Header
=
"Pane3"
Telerik:RadDocking.SerializationTag
=
"C3"
>
<
ContentControl
cal:RegionManager.RegionName
=
"{Binding MERegionName}"
DataContext
=
"{Binding}"
/>
</
Telerik:RadPane
>
</
Telerik:RadPaneGroup
>
</
Telerik:RadSplitContainer
>
</
Telerik:RadDocking.DocumentHost
>
</
Telerik:RadDocking
>
At runtime, when I begin drag the pane with the PRISM region, I got the following error:
An exception occurred while creating a region with name 'cc4ebccf-36cf-410c-b390-318f6e905d1b'. The exception was: System.InvalidOperationException: ContentControl's Content property is not empty.
This control is being associated with a region, but the control is already bound to something else.
If you did not explicitly set the control's Content property,
this exception may be caused by a change in the value of the inherited RegionManager attached property.
at Microsoft.Practices.Composite.Presentation.Regions.ContentControlRegionAdapter.Adapt(IRegion region, ContentControl regionTarget) in E:\Projects\PrismLib\Source\Main\CAB\Composite.Presentation\Regions\ContentControlRegionAdapter.cs:line 58
at Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.Initialize(T regionTarget, String regionName) in E:\Projects\PrismLib\Source\Main\CAB\Composite.Presentation\Regions\RegionAdapterBase.cs:line 65
at Microsoft.Practices.Composite.Presentation.Regions.RegionAdapterBase`1.Microsoft.Practices.Composite.Regions.IRegionAdapter.Initialize(Object regionTarget, String regionName) in E:\Projects\PrismLib\Source\Main\CAB\Composite.Presentation\Regions\RegionAdapterBase.cs:line 82
at Microsoft.Practices.Composite.Presentation.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName) in E:\Projects\PrismLib\Source\Main\CAB\Composite.Presentation\Regions\Behaviors\DelayedRegionCreationBehavior.cs:line 137.
Thanks,
Balazs