예제 #1
0
 public Item(IComponent component)
 {
     InnerElement = Button(_("tss-contextmenu-item"));
     InnerElement.appendChild(component.Render());
     AttachClick();
     InnerElement.addEventListener("mouseover", OnItemMouseOver);
 }
예제 #2
0
 public Item(string text = string.Empty)
 {
     _innerComponent = null;
     InnerElement    = Button(_("tss-contextmenu-item", text: text));
     AttachClick();
     InnerElement.addEventListener("mouseenter", OnItemMouseEnter);
     InnerElement.addEventListener("mouseleave", OnItemMouseLeave);
 }
예제 #3
0
            public Item(IComponent component)
            {
                if (component is ITextFormating itf && (itf is Button || itf is Link))
                {
                    itf.SetTextAlign(TextAlign.Left);
                }

                _innerComponent = component.Render();
                InnerElement    = Div(_("tss-contextmenu-item"), _innerComponent);
                InnerElement.appendChild(_innerComponent);
                AttachClick();
                InnerElement.addEventListener("mouseenter", OnItemMouseEnter);
                InnerElement.addEventListener("mouseleave", OnItemMouseLeave);
            }
예제 #4
0
 public Item(string text = string.Empty)
 {
     InnerElement = Button(_("tss-contextmenu-item", text: text));
     AttachClick();
     InnerElement.addEventListener("mouseover", OnItemMouseOver);
 }