Example #1
0
 public T AddEvent(string _EventName, UiFunction _PropValueFunc)
 {
     Myself.Events = Myself.Events ?? new Dictionary <string, List <UiFunction> >();
     if (!Myself.Events.ContainsKey(_EventName))
     {
         Myself.Events.Add(_EventName, new List <UiFunction>());
     }
     Myself.Events[_EventName].Add(_PropValueFunc);
     return(Myself);
 }
Example #2
0
        public void AddProp(string _PropName, object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null)
        {
            if (_PropValue == null && _PropValueFunc == null && _Index == null)
            {
                return;
            }
            if (!this.ContainsKey(_PropName))
            {
                this.Add(_PropName, new Prop());
            }

            this[_PropName].Set(_PropValue, _PropValueFunc, _Index);
        }
Example #3
0
        public void Set(object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null)
        {
            if (_PropValue != null)
            {
                this.Values = this.Values ?? new List <object>();
                this.Values.Add(_PropValue);
            }

            if (_PropValueFunc != null)
            {
                this.Funcs = this.Funcs ?? new List <UiFunction>();
                this.Funcs.Add(_PropValueFunc);
            }
            if (_Index != null)
            {
                if (this.Indexs == null)
                {
                    this.Indexs = new List <string>();
                }
                this.Indexs.Add(_Index);
            }
        }
Example #4
0
 public T aria_label(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("aria-label", true));
 }
Example #5
0
 public T aria_expanded(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("aria-expanded", true));
 }
Example #6
0
 public T type(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("type", value, fun, index));
 }
Example #7
0
 public T role(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("role", true));
 }
Example #8
0
 public T AddProp(string _PropName, object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null)
 {
     Myself.Props = Myself.Props ?? new PropList();
     Myself.Props.AddProp(_PropName, _PropValue, _PropValueFunc, _Index);
     return(Myself);
 }
Example #9
0
 void IUiComponent.AddEvent(string _EventName, UiFunction _PropValueFunc)
 {
     this.AddEvent(_EventName, _PropValueFunc);
 }
Example #10
0
 public T For(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("for", value, fun, index));
 }
Example #11
0
 //--------------------------------------- Events ---------------------------------//
 public T OnClick(UiFunction ufunc)
 {
     return(AddEvent("onClick", ufunc));
 }
Example #12
0
 public T height(int?value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("height", value, fun, index));
 }
Example #13
0
 public T activeClassName(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("activeClassName", value, fun, index));
 }
Example #14
0
 public T width(int?value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("width", value, fun, index));
 }
Example #15
0
 public T href(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("href", value, fun, index));
 }
Example #16
0
 public T Content(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddContent(value, fun, index));
 }
Example #17
0
 public T data_target(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("data-target", true));
 }
Example #18
0
 public T placeholder(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("placeholder", value, fun, index));
 }
Example #19
0
 public T aria_hidden(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("aria-hidden", true));
 }
Example #20
0
 public T max(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("max", value, fun, index));
 }
Example #21
0
 public T OnChange(UiFunction ufunc)
 {
     return(AddEvent("onChange", ufunc));
 }
Example #22
0
 void IUiComponent.AddProp(string _PropName, object _PropValue, UiFunction _PropValueFunc, string _Index)
 {
     this.AddProp(_PropName, _PropValue, _PropValueFunc, _Index);
 }
Example #23
0
 public T AddContent(object _PropValue = null, UiFunction _PropValueFunc = null, string _Index = null)
 {
     Myself.Contents = Myself.Contents ?? new Prop();
     Myself.Contents.Set(_PropValue, _PropValueFunc, _Index);
     return(Myself);
 }
Example #24
0
 public T rows(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("rows", value, fun, index));
 }
Example #25
0
 public T colspan(string value = null, UiFunction fun = null, string index = null)
 {
     return(AddProp("colspan", value, fun, index));
 }
Example #26
0
 void IUiComponent.AddContent(object _PropValue, UiFunction _PropValueFunc, string _Index)
 {
     this.AddContent(_PropValue, _PropValueFunc, _Index);
 }