This is a migrated thread and some comments may be shown as answers.

Default readonly editortemplate

1 Answer 105 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 16 Jan 2013, 12:57 PM
Hi,

Can I override default editortemplate for properties?

I would like to use TextBox instead of TextBlock on properties, that are readonly (like in VS2012
I'm using autogenerated scenarios.

I guess setting editortemplate explicitly in propertydefinition will override editortemplateselector logic as well, which is not desired behaviour

1 Answer, 1 is accepted

Sort by
0
Daniel
Top achievements
Rank 1
answered on 27 Feb 2013, 07:34 PM
You can consider this a a Feature Request.

There should be a DataTemplate in Telerik.Windows.Controls.Data.xaml for default editor template used by RadPropertyGrid.

We want to customize the default editor.

for example replacing the default textbox with following xaml would solve frequented problems with long texts and horizontal scrollbar inside propertygrid:
<Grid x:Name="editor_root">
 <TextBox Width="{Binding ActualWidth, Source={x:Reference editor_root}}" />
</Grid>

Setting ScrollViewer.HorizontalScrollbarVisibility="Disabled"  inside RadPropertyGrid controltemplate is bad practice, because it can cause clipping content if there is not enough space.

Tags
PropertyGrid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Daniel
Top achievements
Rank 1
Share this question
or