You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.6 KiB
51 lines
1.6 KiB
/*************************************************************************************
|
|
|
|
Toolkit for WPF
|
|
|
|
Copyright (C) 2007-2017 Xceed Software Inc.
|
|
|
|
This program is provided to you under the terms of the Microsoft Public
|
|
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|
|
|
For more features, controls, and fast professional support,
|
|
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
|
|
|
|
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
|
|
|
|
************************************************************************************/
|
|
|
|
using System.Windows;
|
|
using Xceed.Wpf.AvalonDock.Layout.Serialization;
|
|
using System.IO;
|
|
|
|
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.AvalonDock.Views
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for AvalonDockView.xaml
|
|
/// </summary>
|
|
public partial class AvalonDockView : DemoView
|
|
{
|
|
public AvalonDockView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void SaveButton_Click( object sender, RoutedEventArgs e )
|
|
{
|
|
using( var writer = new StreamWriter( "AvalonDockSavedFile.txt" ) )
|
|
{
|
|
var layoutSerializer = new XmlLayoutSerializer( _dockingManager );
|
|
layoutSerializer.Serialize( writer );
|
|
}
|
|
}
|
|
|
|
private void LoadButton_Click( object sender, RoutedEventArgs e )
|
|
{
|
|
using( var reader = new StreamReader( "AvalonDockSavedFile.txt" ) )
|
|
{
|
|
var layoutSerializer = new XmlLayoutSerializer( _dockingManager );
|
|
layoutSerializer.Deserialize( reader );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|