Ejemplo n.º 1
0
        public override void CreateUIElement()
        {
            XamTabControl tab = new XamTabControl();

            tab.MinHeight = Convert.ToDouble(Input.GetInput("MinHeight", 100));
            tab.MinWidth  = Convert.ToDouble(Input.GetInput("MinWidth", 400));
            tab.MaxHeight = Convert.ToDouble(Input.GetInput("MaxHeight", 500));
            tab.MaxWidth  = Convert.ToDouble(Input.GetInput("MaxWidth", 1000));

            int n = GetControlCount();

            for (int i = 0; i < n; i++)
            {
                //Get the control
                IUIControl control = GetControl(i);
                IUIInput   param   = control.Input;

                //Create the tab item
                TabItemEx item         = new TabItemEx();
                string    defaultTitle = (string)param.GetInput("Description", "Item-" + (i + 1).ToString());
                item.Header  = (string)param.GetInput("title", defaultTitle);
                item.Content = control.GetUIElement();

                //Add the tab item to the tab control
                tab.Items.Add(item);
            }

            UtilityMethods.SetPanelResources(tab);
            UIElement = tab;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Set the parameters of the UIElement
 /// </summary>
 /// <param name="valuePairs"></param>
 public override void SetInput(IUIInput input) // IUIInput
 {
     base.SetInput(input);
     if (Input.HasParameter("min"))
     {
         min = float.Parse(input.GetInput("min").ToString());
     }
     if (Input.HasParameter("max"))
     {
         max = float.Parse(input.GetInput("max").ToString());
     }
 }
        public override void SetInput(IUIInput input)
        {
            base.SetInput(input);

            Options = (Dictionary <string, object>)input.GetInput("Options", new Dictionary <string, object>());
        }