static void AddLabelProperties(LabelDescriptor descriptor, List <PropertyDescriptor> properties, string category)
 {
     foreach (PropertyDescriptor property in descriptor.GetProperties())
     {
         if (property.Name == "Text")
         {
             continue;
         }
         properties.Add(property);
     }
 }
        void AddObjectProperties(List <PropertyDescriptor> properties, string category)
        {
            // Adding Stroke properties.
            // Check if there is any object in selection list supports stroke
            bool addStroke = false;

            if (_selectionObject != null)
            {
                foreach (AnnObject annObject in _selectionObject.SelectedObjects)
                {
                    if (annObject.SupportsStroke)
                    {
                        addStroke = true;
                    }
                }
            }
            else
            {
                addStroke = _object.SupportsStroke;
            }

            if (addStroke)
            {
                StrokeDescriptor stroke = new StrokeDescriptor(_object.Stroke, "Stroke");
                foreach (PropertyDescriptor property in stroke.GetProperties())
                {
                    properties.Add(property);
                }
            }

            // Adding Fill property.
            if (_object.SupportsFill)
            {
                List <Attribute> attribs = new List <Attribute>();
                attribs.Add(new EditorAttribute(typeof(FillEditor), typeof(UITypeEditor)));

                if (_object.Id != AnnObject.HiliteObjectId)
                {
                    properties.Add(new CustomPropertyDescriptor(_type.GetProperty("Fill"), _object, "Style", "Fill", attribs.ToArray(), typeof(BrushConverter)));
                }
                else
                {
                    properties.Add(new CustomPropertyDescriptor(_type.GetProperty("HiliteColor"), _object, "Color", "Fill", attribs.ToArray(), typeof(ColorConverter)));
                }
            }

            // Adding Hyperlink property.
            properties.Add(new CustomPropertyDescriptor(_type.GetProperty("Hyperlink"), _object, "Hyperlink", "Misc"));

            if (_object.SupportsOpacity)
            {
                // Adding Opacity property.
                properties.Add(new CustomPropertyDescriptor(_type.GetProperty("Opacity"), _object, "Opacity", "Misc"));
            }

            // Adding FixedState properties.
            if (_showFixedState)
            {
                FixedStateDescriptor fixedState = new FixedStateDescriptor(_object, "Fixed State");
                foreach (PropertyDescriptor property in fixedState.GetProperties())
                {
                    properties.Add(property);
                }
            }

            // Adding metadata for
            if (_object.Metadata != null && _object.Metadata.Count > 0)
            {
                foreach (string key in _object.Metadata.Keys)
                {
                    string value = _object.Metadata[key];
                    if (!string.IsNullOrEmpty(value))
                    {
                        properties.Add(new CustomPropertyDescriptor(key, value, "Metadata"));
                    }
                }
            }

            // Adding labels.
            LabelDescriptor label = new LabelDescriptor(_object.Labels["AnnObjectName"], "Name", _automation);

            foreach (PropertyDescriptor property in label.GetProperties())
            {
                properties.Add(property);
            }
        }