Beispiel #1
0
        /// <summary>
        /// Syncronizes the default toggle buttons in the <see cref="PropertyGridToolbarElement"/>
        /// with the PropertySort property of the <see cref="PropertyGridElement"/>.
        /// </summary>
        public virtual void SyncronizeToggleButtons()
        {
            PropertyGridElement propertyGridElement = this.PropertyGridElement;

            if (propertyGridElement != null)
            {
                PropertySort initialPropertySort = propertyGridElement.PropertyTableElement.PropertySort;

                this.UnwireEvents();

                switch (initialPropertySort)
                {
                case PropertySort.Alphabetical:
                    this.alphabeticalPropertySort.ToggleState            = ToggleState.On;
                    this.categorizedAlphabeticalPropertySort.ToggleState = ToggleState.Off;
                    break;

                case PropertySort.Categorized:
                    this.alphabeticalPropertySort.ToggleState            = ToggleState.Off;
                    this.categorizedAlphabeticalPropertySort.ToggleState = ToggleState.Off;
                    break;

                case PropertySort.CategorizedAlphabetical:
                    this.alphabeticalPropertySort.ToggleState            = ToggleState.Off;
                    this.categorizedAlphabeticalPropertySort.ToggleState = ToggleState.On;
                    break;

                case PropertySort.NoSort:
                    this.alphabeticalPropertySort.ToggleState            = ToggleState.Off;
                    this.categorizedAlphabeticalPropertySort.ToggleState = ToggleState.Off;
                    break;
                }

                this.WireEvents();
            }
        }
Beispiel #2
0
 protected override void CreateChildItems(RadElement parent)
 {
     this.propertyGridElement = this.CreatePropertyGridElement();
     parent.Children.Add((RadElement)this.propertyGridElement);
 }