In a RadDocking implementation, I have a DocumentHost, to which I add some RadDocumentPane objects during runtime.
The user can undock these document panes to create floating panes. When they click a Save button, I am trying to get the properties of those document panes and store them off in a database. I do NOT want to use the LoadSaveLayout system that RadDocking provides via tagging etc.
So the user clicks Save, I iterate thru all the visible RadDocumentPane objects, and get properties:
Location is always coming back as 0,0, and size is always coming back as 220x300, no matter where the user has dragged the floating document pane, and no matter how much they've resized it.
Help? :)
The user can undock these document panes to create floating panes. When they click a Save button, I am trying to get the properties of those document panes and store them off in a database. I do NOT want to use the LoadSaveLayout system that RadDocking provides via tagging etc.
So the user clicks Save, I iterate thru all the visible RadDocumentPane objects, and get properties:
...
Point location = RadDocking.GetFloatingLocation(pane.ParentOfType<RadSplitContainer>());
xwriter.WriteAttributeString(
"Top"
, location.Y.ToString(ifp));
xwriter.WriteAttributeString(
"Left"
, location.X.ToString(ifp));
Size size = RadDocking.GetFloatingSize(pane.ParentOfType<RadSplitContainer>());
xwriter.WriteAttributeString(
"Width"
, size.Width.ToString(ifp));
xwriter.WriteAttributeString(
"Height"
, size.Height.ToString(ifp));
...
Help? :)
<
telerik:RadDocking
HorizontalAlignment
=
"Stretch"
x:Name
=
"radDocking1"
VerticalAlignment
=
"Stretch"
Close
=
"radDocking1_Close"
PreviewShowCompass
=
"radDocking1_PreviewShowCompass"
PaneStateChange
=
"radDocking1_PaneStateChange"
>
<
telerik:RadSplitContainer
x:Name
=
"toolsSplitContainer"
InitialPosition
=
"DockedLeft"
Orientation
=
"Vertical"
>
<
telerik:RadPaneGroup
x:Name
=
"radPaneGroup1"
>
<
telerik:RadPane
x:Name
=
"layoutsPane"
Header
=
"Layouts"
CanFloat
=
"False"
CanUserClose
=
"False"
IsSelected
=
"True"
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
</
Grid.RowDefinitions
>
<
telerik:RadTreeView
x:Name
=
"layoutsTreeView"
Margin
=
"0"
Grid.Row
=
"1"
IsEditable
=
"True"
ItemTemplateSelector
=
"{StaticResource myCategoryLayoutDataTemplateSelector}"
MouseLeftButtonDown
=
"layoutsTreeView_MouseLeftButtonDown"
>
</
telerik:RadTreeView
>
</
Grid
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
<
telerik:RadPaneGroup
x:Name
=
"propertiesPaneGroup"
SelectedIndex
=
"-1"
>
<
telerik:RadPane
x:Name
=
"propertiesPane"
Header
=
"Properties"
CanFloat
=
"False"
CanUserClose
=
"False"
HorizontalAlignment
=
"Right"
/>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
<
telerik:RadDocking.DocumentHost
>
<
telerik:RadSplitContainer
x:Name
=
"mainSplitContainer"
>
<
telerik:RadPaneGroup
x:Name
=
"DocPane"
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking.DocumentHost
>
</
telerik:RadDocking
>