-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml.cs
27 lines (26 loc) · 1.01 KB
/
MainWindow.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using DevExpress.Xpf.Core;
using DevExpress.Xpf.Docking;
using DevExpress.Xpf.Layout.Core;
using System.Windows.Controls;
namespace DXSample {
public partial class MainWindow : ThemedWindow {
const string LayoutFileName = "layout.xml";
public MainWindow() {
InitializeComponent();
}
private void OnSaveButtonClick(object sender, System.Windows.RoutedEventArgs e) {
manager.SaveLayoutToXml(LayoutFileName);
}
private void OnRestoreButtonClick(object sender, System.Windows.RoutedEventArgs e) {
manager.RestoreLayoutFromXml(LayoutFileName);
}
private void OnAddPanelButtonClick(object sender, System.Windows.RoutedEventArgs e) {
var panel = manager.DockController.AddPanel(DockType.Fill);
panel.Name = "panel4";
panel.Caption = "Panel4";
manager.DockController.Dock(panel, root, DockType.Right);
((Button)sender).IsEnabled = false;
}
}
}