The CollectionEditor control has a resize functionality which allows you to drag its bottom right cornet, which changes the Width and Height of the root element in the ControlTemplate of the CollectionEditor. When hosted in CollectionEditorPicker, the CollectionEditor is placed in a RadDropDownButton's DropDownContent which is basically a Popup with Placement=Bottom. When the popup goes near the bottom edge of the screen, thus doesn't having enough height to render all its contents, the Popup is automatically re-positioned so it aligns top to its parent element (the RadDropDownButton in this case). In other words, the Popup starts behaving as if its Placement=Top.
This behavior leads to issues with the vertical resizing of the CollectionEditor control. Firstly, when the Popup is automatically aligned using the Top placement, if you resize to a size small enough to fit under the picker control, the Popup gets re-positioned below the picker. Secondly, if you vertically resize the CollectionEditor to a bigger size while aligned to Top, the resizing action will increase the control height, but because of the alignment it will look like the resizing happens from the top corner of the control. In this scenario, also the buttons of the CollectionEditor disappear.
To work this around, you can disable the resizing behavior of the CollectionEditor control.
static MainWindow()
{
EventManager.RegisterClassHandler(typeof(CollectionEditor), CollectionEditor.LoadedEvent, new RoutedEventHandler(CollectionEditor_Loaded));
}
private static void CollectionEditor_Loaded(object sender, RoutedEventArgs e)
{
var collectionEditor = (CollectionEditor)sender;
var popupParent = collectionEditor.ParentOfType<Popup>();
if (popupParent != null && popupParent.PlacementTarget.GetType() == typeof(CollectionEditorPicker))
{
collectionEditor.ResizeGripperVisibility = Visibility.Collapsed;
}
}
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.
SelectedPropertyDefinitions are not cleared when RadPropertyGrid.Item being changed.