or
ListStyle newListStyle = DefaultListStyles.Numbered; DocumentList documentList = new DocumentList(newListStyle, Document); for(int i=0;i<maxTOClevel;i++) { documentList.Style.Levels[i].Indent = 0; documentList.Style.Levels[i].HangingIndent = 0; documentList.Style.Levels[i].NumberingFormat = ListNumberingFormat.Decimal; }StyleDefinition toc1Style = Document.StyleRepository[RadDocumentDefaultStyles.GetTocStyleNameByIndex(1)];toc1Style.SpanProperties.UnderlineDecoration = UnderlineTypes.Line;
private void PropsGrid_AutoGeneratingPropertyDefinition(object sender, Telerik.Windows.Controls.Data.PropertyGrid.AutoGeneratingPropertyDefinitionEventArgs e){ string[] hiddenProperties = { "RotationAngle", "IsSelected", "Position", "Visibility", "Width", "Height", "Content", "Background" }; if (hiddenProperties.Contains(e.PropertyDefinition.SourceProperty.Name)) { // I want to hide some properties of the inherited object (this works) e.PropertyDefinition.Visibility = System.Windows.Visibility.Collapsed; } else if (e.PropertyDefinition.SourceProperty.PropertyType == typeof(IPAddress)) { // I want to show IP address, but do not want them to expand NestedProperties // THIS DOESNT WORK e.PropertyDefinition.NestedProperties = null; }}