/// <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(); } }
protected override void CreateChildItems(RadElement parent) { this.propertyGridElement = this.CreatePropertyGridElement(); parent.Children.Add((RadElement)this.propertyGridElement); }