forked from github/VisualStudio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSectionControl.cs
More file actions
54 lines (46 loc) · 1.55 KB
/
SectionControl.cs
File metadata and controls
54 lines (46 loc) · 1.55 KB
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
46
47
48
49
50
51
52
53
54
using System;
using System.Collections;
using System.Windows;
using System.Windows.Controls;
namespace GitHub.UI
{
public class SectionControl : ContentControl
{
public static readonly DependencyProperty ButtonsProperty = DependencyProperty.Register(
"Buttons",
typeof(IList),
typeof(SectionControl));
public static readonly DependencyProperty HeaderTextProperty = DependencyProperty.Register(
"HeaderText",
typeof(string),
typeof(SectionControl));
public static readonly DependencyProperty IsExpandedProperty = DependencyProperty.Register(
"IsExpanded",
typeof(bool),
typeof(SectionControl),
new FrameworkPropertyMetadata(true));
static SectionControl()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(SectionControl), new FrameworkPropertyMetadata(typeof(SectionControl)));
}
public SectionControl()
{
Buttons = new ArrayList();
}
public IList Buttons
{
get { return (IList)GetValue(ButtonsProperty); }
set { SetValue(ButtonsProperty, value); }
}
public string HeaderText
{
get { return (string)GetValue(HeaderTextProperty); }
set { SetValue(HeaderTextProperty, value); }
}
public bool IsExpanded
{
get { return (bool)GetValue(IsExpandedProperty); }
set { SetValue(IsExpandedProperty, value); }
}
}
}