Ooui-tws-port/Ooui/FormControl.cs

35 lines
760 B
C#
Raw Normal View History

2017-06-13 07:03:01 +00:00
using System;
namespace Ooui
{
public abstract class FormControl : Element
{
string name = "";
public string Name {
get => name;
set => SetProperty (ref name, value, "name");
}
2017-06-15 06:20:51 +00:00
2017-06-16 05:33:12 +00:00
bool isDisabled = false;
public bool IsDisabled {
get => isDisabled;
set => SetProperty (ref isDisabled, value, "disabled");
}
2017-06-16 06:35:58 +00:00
public Form Form {
get {
var p = ParentNode;
while (p != null && !(p is Form)) {
p = p.ParentNode;
}
return p as Form;
}
}
2017-06-15 06:20:51 +00:00
public FormControl (string tagName)
: base (tagName)
{
}
2017-06-13 07:03:01 +00:00
}
}