protected override PropertyManagerPageComboBoxControl <TVal> CreateControl( IPropertyManagerPageCombobox swCtrl, IAttributeSet atts, IMetadata[] metadata, SwPropertyManagerPageHandler handler, short height, IPropertyManagerPageLabel label) { if (height != -1) { swCtrl.Height = height; } if (atts.Has <ComboBoxOptionsAttribute>()) { var opts = atts.Get <ComboBoxOptionsAttribute>(); if (opts.Style != 0) { swCtrl.Style = (int)opts.Style; } } m_Helper.ParseItems(m_SwApp, atts, metadata, out bool isStatic, out ItemsControlItem[] staticItems, out IMetadata srcMetadata); var ctrl = new PropertyManagerPageComboBoxControl <TVal>(atts.Id, atts.Tag, swCtrl, handler, srcMetadata, label, atts.ContextType, isStatic, staticItems, metadata); return(ctrl); }
protected override PropertyManagerPageComboBoxControl <TVal> CreateControl( IPropertyManagerPageCombobox swCtrl, IAttributeSet atts, IMetadata metadata, SwPropertyManagerPageHandler handler, short height) { if (height != -1) { swCtrl.Height = height; } var selDefVal = false; if (atts.Has <ComboBoxOptionsAttribute>()) { var opts = atts.Get <ComboBoxOptionsAttribute>(); if (opts.Style != 0) { swCtrl.Style = (int)opts.Style; } selDefVal = opts.SelectDefaultValue; } var ctrl = new PropertyManagerPageComboBoxControl <TVal>(atts.Id, atts.Tag, selDefVal, swCtrl, handler, metadata); ctrl.Items = m_Helper.GetItems(m_SwApp, atts); return(ctrl); }
protected override PropertyManagerPageComboBoxControl <TVal> CreateControl( IPropertyManagerPageCombobox swCtrl, IAttributeSet atts, SwPropertyManagerPageHandler handler, short height) { if (height != -1) { swCtrl.Height = height; } if (atts.Has <ComboBoxOptionsAttribute>()) { var style = atts.Get <ComboBoxOptionsAttribute>(); if (style.Style != 0) { swCtrl.Style = (int)style.Style; } } var ctrl = new PropertyManagerPageComboBoxControl <TVal>(atts.Id, atts.Tag, swCtrl, handler); ctrl.Items = GetItems(atts); return(ctrl); }