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;
}));
}
Handle the case when the cell is too small and the value contains a decimal separator.
For example, see attached images.
Currently, the only customization that can be performed is using HyperlinkToolTipFormatString property of RadRichTextBox, which sets the format for all hyperlinks in the document of the control. It would be nice if it were possible to be able to set different tooltips.
Bold/Italic does not work for some font styles.
This might be a framework limitation in WPF: https://www.telerik.com/forums/some-fonts-are-not-able-to-bold-italic
Sample fonts list:
When using an INotifyCollectionChanged (like ObservableCollection<T>), RadGridView's data engine subscribes to the CollectionChanged event of the bound collection.
It seems that the WPF views are recreated when you connect to a running remote desktop session or switch the user to a session where the corresponding WPF app is already opened. This creates new instances of all controls, but no unload or another disposal event happens. In this case, the logic that subscribes to the CollectionChanged event again is triggered for the new RadGridView, but the old one never detaches from the event. This causes a memory leak.
If you connect to the session multiple times, the CollectionChanged handler will be attached multiple times leading to a memory leak.
To work this around, set the ItemsSource of RadGridView to null in the SystemEvents.SessionChanged static event.
private void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e)
{
if (e.Reason == SessionSwitchReason.SessionLock)
{
BindingOperations.ClearAllBindings(this.RadGridViewFixed);
}
}
Allow to track points that intercept vertical line from mouse position (as now) or points that intercept horizontal line from mouse position. So allow to choose TrackDirection = Horizontal/Vertical Thanks. marc.
Missing localization strings in PageSetup dialog.
Go to the headers and footers section. The localization is missing.
When using an INotifyCollectionChanged (like ObservableCollection<T>), RadDocking subscribes to its CollectionChanged event. This happens on PropertyChanged of the PaneSource property.
It seems that WPF re-intializes the application when you connect to a running remote desktop session or switch the user to a session where the corresponding WPF app is already opened. This triggers the PropertyChanged event again, which subscribes to the PaneSource collection again.
If you connect to the session multiple times, the CollectionChanged handler will be attached multiple times leading to a memory leak.
To work this around, you can manually unsubscribe from the CollectionChanged event when multiple handlers are added.
public class CustomDocking : RadDocking
{
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
if (e.Property.Name == nameof(PanesSource) && PanesSource is INotifyCollectionChanged observableCollection)
{
UnsubscribeCollectionChanged(observableCollection, this);
}
}
public static void UnsubscribeCollectionChanged(INotifyCollectionChanged collection, object dockingInstance)
{
var handlerMethod = typeof(RadDocking).GetMethod("OnPanesSourceCollectionChanged", BindingFlags.NonPublic | BindingFlags.Instance);
var handlerDelegate = Delegate.CreateDelegate(typeof(NotifyCollectionChangedEventHandler), dockingInstance, handlerMethod);
var field = collection.GetType().GetField("CollectionChanged", BindingFlags.Instance | BindingFlags.NonPublic);
var eventDelegate = (MulticastDelegate)field.GetValue(collection);
var handlers = eventDelegate?.GetInvocationList().Where(d => d.Method == handlerMethod);
bool shouldRemoveHandler = handlers.Count() > 1;
if (shouldRemoveHandler)
{
typeof(INotifyCollectionChanged)
.GetEvent("CollectionChanged")
?.RemoveMethod
?.Invoke(collection, new object[] { handlerDelegate });
}
}
}