Pressing the Enter key when a field editor is focused will scroll the vertical scrollbar to the topmost offset. This is reproducible when the properties are grouped. Also, the RenderMode should be set to Flat.
To work this around, change the RenderMode setting to Hierarchical right before the Enter key logic is executed and then return it back to Flat after some time.
private void RadPropertyGrid_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
var propertyGrid = (RadPropertyGrid)sender;
var currentMode = propertyGrid1.RenderMode;
propertyGrid.RenderMode = RenderMode.Hierarchical;
Dispatcher.BeginInvoke(new Action(() =>
{
propertyGrid.RenderMode = currentMode;
}));
}
Add selected inactive state for PropertyGrid Field.
An non edit mode is enabled in the control when the EditMode is set to Single. In this case, only one field can enter edit mode and the rest are read only.
Currently, there is no API that allows you to customize the content (that shows the property value) of the read only fields.
Add an API that allows you to customize the read only content. Similar to the EditorTemplate of the PropertyDefinition.
By the time being, a custom DataTemplate can be applied only for the EditorTemplate. When the EditMode is Single, a plain TextBlock is used for a readonly PropertyDefinition. With the Default EditMode, if the EditorTemplate is set, it will be displayed, but the user needs to stick to the default behavior provided by the ReadOnlyEditorState property (grayed out and disabled element for its Disabled value, and enabled interaction for the ReadOnly one). Provide an option to directly set a ReadOnlyTemplate for both EditModes.