Пример #1
0
        public PropertyCommand[] GetPropertyCommands()
        {
            PropertyDescriptorCollection baseProps = TypeDescriptor.GetProperties(this, true);

            PropertyCommand[] pcs = new PropertyCommand[baseProps.Count];

            for (int i = 0; i < baseProps.Count; i++)
            {
                pcs[i] = new PropertyCommand(baseProps[i].Name, baseProps[i].IsBrowsable, baseProps[i].IsReadOnly);
            }
            return(pcs);
        }
Пример #2
0
        protected void fillPropCommColl()
        {
            PropertyDescriptorCollection baseProps = TypeDescriptor.GetProperties(this, true);

            foreach (PropertyDescriptor oProp in baseProps)
            {
                if (!oProp.DesignTimeOnly && oProp.IsBrowsable && oProp.Category != PROPERTY_CONTROL)
                {
                    PropertyCommand pc = new PropertyCommand(oProp.Name, oProp.IsBrowsable, oProp.IsReadOnly);
                    PropertyCommands.Add(pc);
                }
            }
            PropertyCommands.Sort();
        }