or
<
Style
TargetType
=
"{x:Type t:RadGridView}"
x:Key
=
"OverrideDefaultGridViewStyle"
>
<
Setter
Property
=
"GridLinesVisibility"
Value
=
"None"
/>
<
Setter
Property
=
"RowHeight"
Value
=
"50"
/>
<
Setter
Property
=
"ColumnBackground"
Value
=
"White"
/>
<
Setter
Property
=
"RowIndicatorVisibility"
Value
=
"Collapsed"
/>
<
Setter
Property
=
"ShowGroupPanel"
Value
=
"False"
/>
<
Setter
Property
=
"CanUserFreezeColumns"
Value
=
"False"
/>
<
Setter
Property
=
"CanUserReorderColumns"
Value
=
"False"
/>
</
Style
>
//rdoc is the document, a .docx file used as a template.
//Search for the text "sometext".
DocumentTextSearch dts =
new
DocumentTextSearch(rdoc);
TextRange tr = dts.Find(
"sometext"
);
//Get the inline that the text is in.
Inline iCurrent = (Inline)tr.StartPosition.GetCurrentInline();
//Get the table to delete.
Table tToDelete = iCurrent.GetParentOfType<Table>();
//Delete the table.
sCurrent.Blocks.Remove(tToDelete);
<
Style
x:Key
=
"NewStyle"
TargetType
=
"{x:Type telerik:RadDateTimePicker}"
>
<
Setter
Property
=
"Control.Background"
Value
=
"Red"
/>
</
Style
>
<
Grid
>
<
Grid.DataContext
>
<
ObjectDataProvider
ObjectType
=
"{x:Type viewModels:MyViewModel}"
IsAsynchronous
=
"True"
x:Name
=
"myViewModel"
/>
</
Grid.DataContext
>
<
telerik:RadPropertyGrid
x:Name
=
"settings"
Item
=
"{Binding}"
AutoGeneratePropertyDefinitions
=
"False"
>
<
telerik:RadPropertyGrid.PropertyDefinitions
>
<
telerik:PropertyDefinition
GroupName
=
"TCP"
DisplayName
=
"Status"
>
<
telerik:PropertyDefinition.Binding
>
<
PriorityBinding
FallbackValue
=
"Reading..."
>
<
Binding
Path
=
"Status"
IsAsync
=
"True"
Mode
=
"TwoWay"
/>
</
PriorityBinding
>
</
telerik:PropertyDefinition.Binding
>
</
telerik:PropertyDefinition
>
</
telerik:RadPropertyGrid.PropertyDefinitions
>
</
telerik:RadPropertyGrid
>
</
Grid
>