forked from extnet/Ext.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseMenuItem.cs
More file actions
149 lines (142 loc) · 4.61 KB
/
BaseMenuItem.cs
File metadata and controls
149 lines (142 loc) · 4.61 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/********
* @version : 1.6.0 - Ext.NET Pro License
* @author : Ext.NET, Inc. http://www.ext.net/
* @date : 2012-11-21
* @copyright : Copyright (c) 2007-2012, Ext.NET, Inc. (http://www.ext.net/). All rights reserved.
* @license : See license.txt and http://www.ext.net/license/.
********/
using System.ComponentModel;
namespace Ext.Net
{
/// <summary>
///
/// </summary>
[Meta]
[Description("")]
public abstract partial class BaseMenuItem : Component
{
/// <summary>
/// The CSS class to use when the item becomes activated (defaults to \"x-menu-item-active\").
/// </summary>
[Meta]
[ConfigOption]
[Category("4. BaseItem")]
[DefaultValue("")]
[NotifyParentProperty(true)]
[Description("The CSS class to use when the item becomes activated (defaults to \"x-menu-item-active\").")]
public virtual string ActiveClass
{
get
{
return (string)this.ViewState["ActiveClass"] ?? "";
}
set
{
this.ViewState["ActiveClass"] = value;
}
}
/// <summary>
/// True if this item can be visually activated (defaults to false).
/// </summary>
[Meta]
[ConfigOption]
[Category("4. BaseItem")]
[DefaultValue(false)]
[NotifyParentProperty(true)]
[Description("True if this item can be visually activated (defaults to false).")]
public virtual bool CanActivate
{
get
{
object obj = this.ViewState["CanActivate"];
return (obj == null) ? false : (bool)obj;
}
set
{
this.ViewState["CanActivate"] = value;
}
}
/// <summary>
/// A function that will handle the click event of this menu item (defaults to undefined).
/// </summary>
[Meta]
[ConfigOption(JsonMode.Raw)]
[Category("4. BaseItem")]
[DefaultValue("")]
[NotifyParentProperty(true)]
[Description("A function that will handle the click event of this menu item (defaults to undefined).")]
public virtual string Handler
{
get
{
return (string)this.ViewState["Handler"] ?? "";
}
set
{
this.ViewState["Handler"] = value;
}
}
/// <summary>
/// The scope (this reference) in which the handler function will be called.
/// </summary>
[Meta]
[ConfigOption(JsonMode.Raw)]
[Category("4. BaseItem")]
[DefaultValue("")]
[NotifyParentProperty(true)]
[Description("The scope (this reference) in which the handler function will be called.")]
public virtual string Scope
{
get
{
return (string)this.ViewState["Scope"] ?? "";
}
set
{
this.ViewState["Scope"] = value;
}
}
/// <summary>
/// Length of time in milliseconds to wait before hiding after a click (defaults to 100).
/// </summary>
[Meta]
[ConfigOption(JsonMode.Raw)]
[Category("4. BaseItem")]
[DefaultValue(100)]
[NotifyParentProperty(true)]
[Description("Length of time in milliseconds to wait before hiding after a click (defaults to 100).")]
public virtual int HideDelay
{
get
{
object obj = this.ViewState["HideDelay"];
return (obj == null) ? 100 : (int)obj;
}
set
{
this.ViewState["HideDelay"] = value;
}
}
/// <summary>
/// True to hide the containing menu after this item is clicked (defaults to true).
/// </summary>
[Meta]
[ConfigOption]
[Category("4. BaseItem")]
[DefaultValue(true)]
[NotifyParentProperty(true)]
[Description("True to hide the containing menu after this item is clicked (defaults to true).")]
public virtual bool HideOnClick
{
get
{
object obj = this.ViewState["HideOnClick"];
return (obj == null) ? true : (bool)obj;
}
set
{
this.ViewState["HideOnClick"] = value;
}
}
}
}