Hi,
Above solution not sovles the problem whole problem but it solves partially.
Suppose i have two columns in the wpf Grid of the Main application and i am registering the Wpf userfcontrol as the toolwindows in the respective columns of the grid like belowed code
<Grid.ColujmnDefinitions>
<ColumnDefinition width="Auto"></ColumnDefinition>
<ColumnDefinition width="*"></ColumnDefinition>
</Grid.ColujmnDefinitions>
I am registering the user controls as the toolwindow using the PrismItegration with docking.
I have one Basedocksite for the both of the docksite windows like
<Docksite x:Name="BaseDocksite">
<Docksite Grid.Column="0" x:Name="Docksite1"></></Docksite>
<Docksite Grid.Column="1" x:Name="Docksite2"></Docksite>
</Docksite>
These above docksites(Docksite1,Docksite2) act as the Region for registering the usercontrol as the toolwindow with the Help of PrismIntegration with docking.These above docksites(Docksite1,Docksite2) are linked with the BaseDocksite.
Once i run the application two toolwindows named toolwindow1 and toolwindow2 displayed in the respective docksites named Docksite1,Docksite2.
Suppose the width of the toolwindow1 is 230.
As i click on the AutoHide pin icon of the toolwindow1 then i am handling the docksite1 window state changte event an in that i am removing the toolwindow1 from the docksite1 and adding that toolwindow in the AutoHideLeftContainer of the BaseDocksite Because toolwindow1 exists in the Auto width column.Now when i hover the mouse i am increasing the width of the toolwindow1 using the belowed code but this width should be maintained when i am again click on the pin button for docking that toookwindow1(while converting the toolwindow1 from AutoHide state into Docked state) while it is inside the AuoHideLeftContainer of the BaseDocksite.But now toolwindow1 width is same as it was 230 not 250 while converting the toolwindow1 from AutoHide state into Docked state)
Code used is
void
dockSite1_WindowStateChanged(object sender, DockingWindowStateChangedEventArgse)
{
if (e.Window.State.ToString() == DockignWindowState.AutoHide)
{
DockSite.SetControlSize(toolwindow1 , newSize(250, 650));toolwindow1 .Activate();
DockSite.SetControlSize(toolwindow1 .ParentContainer, newSize(250, 650));
ToolWindowContainer con = newToolWindowContainer();
if (reviewToolWindow.Parent != null){
ToolWindowContainer ablContainer = toolwindow1 .Parent asToolWindowContainer;
if (ablContainer != null)
{
ablContainer.Items.Remove(toolwindow1 );
tcon.Items.Add(toolwindow1 );
BaseDocksite.AutoHideLeftContainers.Add(con);
}
if (e.Window.State.ToString() == DockignWindowState.Docked)
{
DockSite.SetControlSize(toolwindow1 , newSize(250, 650));toolwindow1 .Activate();
}
}
}
}
Problem: Initially the width of the toolwindow1 is 230. But when i click on the AutoHide pin icon of the toolwindow1 then i am adding that toolwindow1 in the AutoHideLeftContainer of the BaseDocksite .when i hover the mouse over the tabbed form of teh toolwindow I AM ABLE TO INCREASE THE WIDTH OF THE TOOLWINDOW1 FROM 230 TO 250.
BUT when i am again click on the pin button OF TOOLWINDOW1 for docking that toookwindow1 while it is inside the AuoHideLeftContainer of the BaseDocksite ITS DISPLAYING THE TOOLWINDOW1 IN DOCKED STATE BUT OF WIDTH 230 NOT OF 250.