Created
February 25, 2017 04:56
-
-
Save hilapon/2384fa1e6643eee930720458561eaa5a to your computer and use it in GitHub Desktop.
XamDockManager のレイアウトを保存・読み込み・初期化するサンプル (コードビハインド)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows; | |
namespace PersistenceSample2.Views { | |
public partial class MainWindow : Window { | |
private string _defaultLayout = ""; | |
private string _saveLayout = ""; | |
public MainWindow() { | |
InitializeComponent(); | |
} | |
private void buttonReset_Click(object sender, RoutedEventArgs e) { | |
this.dockManager.LoadLayout(_defaultLayout); | |
} | |
private void buttonSave_Click(object sender, RoutedEventArgs e) { | |
_saveLayout = this.dockManager.SaveLayout(); | |
} | |
private void buttonLoad_Click(object sender, RoutedEventArgs e) { | |
this.dockManager.LoadLayout(_saveLayout); | |
} | |
private void Window_ContentRendered(object sender, EventArgs e) { | |
_defaultLayout = this.dockManager.SaveLayout(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment