-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPageHeader.xaml.cs
45 lines (37 loc) · 1.44 KB
/
PageHeader.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System.Windows;
namespace boss.client.win
{
public partial class PageHeader
{
public PageHeader()
{
DataContext = this;
InitializeComponent();
}
public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(
"Title", typeof(string), typeof(PageHeader), new PropertyMetadata(default(string)));
public string Title
{
get { return (string) GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}
public static readonly DependencyProperty ToolBarProperty = DependencyProperty.Register(
"ToolBar", typeof(FrameworkElement), typeof(PageHeader), new PropertyMetadata(default(FrameworkElement)));
public FrameworkElement ToolBar
{
get { return (FrameworkElement) GetValue(ToolBarProperty); }
set { SetValue(ToolBarProperty, value); }
}
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
"Icon", typeof(string), typeof(PageHeader), new PropertyMetadata(default(string)));
public string Icon
{
get { return (string) GetValue(IconProperty); }
set { SetValue(IconProperty, value); }
}
private void Close_OnClick(object sender, RoutedEventArgs e)
{
ApplicationEvents.OnCloseActivePageRequested();
}
}
}