Hi Sid,
1) Position Tab Items
You can position the Tab items the way you want. They are stocked in LayoutDocumentPane.Children. You can re-arrange this Collection. Here's an example to display the tabs from last to first :
2) Empty floating windows
Maybe it is related to Tab content. When using TextBoxes or Buttons, the FloatingWindows are not empty. What are you using in you Tab as content?
3) Saved Docked position
You can use the XmlLayoutSerializer. This option can also be used for 1), In my sample I have 2 buttons (Save and Load). The "Save" button will Serialize while the "Load" button will deserialize.
1) Position Tab Items
You can position the Tab items the way you want. They are stocked in LayoutDocumentPane.Children. You can re-arrange this Collection. Here's an example to display the tabs from last to first :
var initialList = _layoutDocumentPane.Children.ToList();
_layoutDocumentPane.Children.Clear();
for( int i = initialList.Count - 1 ; i >= 0 ; --i )
{
_layoutDocumentPane.Children.Add( initialList[ i ] );
}
So you could save this List and re-apply it when the application is re-started.2) Empty floating windows
Maybe it is related to Tab content. When using TextBoxes or Buttons, the FloatingWindows are not empty. What are you using in you Tab as content?
3) Saved Docked position
You can use the XmlLayoutSerializer. This option can also be used for 1), In my sample I have 2 buttons (Save and Load). The "Save" button will Serialize while the "Load" button will deserialize.
private string lastLayout = "";
private void SaveButton_Click( object sender, RoutedEventArgs e )
{
StringBuilder sb = new StringBuilder();
using( StringWriter sw = new StringWriter( sb ) )
{
var serializer = new XmlLayoutSerializer( _dockingManager );
serializer.Serialize( sw );
sw.Flush();
lastLayout = sb.ToString();
}
}
private void LoadButton_Click( object sender, RoutedEventArgs e )
{
StringReader sr = new StringReader( lastLayout );
var serializer = new XmlLayoutSerializer( _dockingManager );
serializer.Deserialize( sr );
}