Hi!
I'm using a PropertyGrid which, for some string properties, requires a custom control a made, LinkTextBox.
I created a datatemplate,
<DataTemplate x:Key="linkTextBoxDataTemplate">
<Wpf:LinkTextBox TextMaxLength="4000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
telerik:AutoBindBehavior.UpdateBindingOnElementLoaded="Text"/>
</DataTemplate>
where Text is the name of the control's property the property grid property is bounded to. I noticed this is required for binding.
I have 2 problems.
1. I need to access at runtime the LinkTextBox instance, for the current selected property. Using grdPropr.SelectedPropertyDefinition.EditorTemplate I get the above template, but I cannot navigate in the Visual/Logical tree. I can't use the .LoadContent() method, because this gives me e new instance of my control, not the one inside the PropertyGrid
2. When using a custom EditorTemplate, like this one, I noticed that when clicking in the control doesn't actually select the property in the PropertyGrid. When using the default template, clicking in the TextBox (which is the default editor for strings) automatically selects the current property
Thanks,
Alex
I'm using a PropertyGrid which, for some string properties, requires a custom control a made, LinkTextBox.
I created a datatemplate,
<DataTemplate x:Key="linkTextBoxDataTemplate">
<Wpf:LinkTextBox TextMaxLength="4000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
telerik:AutoBindBehavior.UpdateBindingOnElementLoaded="Text"/>
</DataTemplate>
where Text is the name of the control's property the property grid property is bounded to. I noticed this is required for binding.
I have 2 problems.
1. I need to access at runtime the LinkTextBox instance, for the current selected property. Using grdPropr.SelectedPropertyDefinition.EditorTemplate I get the above template, but I cannot navigate in the Visual/Logical tree. I can't use the .LoadContent() method, because this gives me e new instance of my control, not the one inside the PropertyGrid
2. When using a custom EditorTemplate, like this one, I noticed that when clicking in the control doesn't actually select the property in the PropertyGrid. When using the default template, clicking in the TextBox (which is the default editor for strings) automatically selects the current property
Thanks,
Alex