NullReferenceException is thrown with the following stacktrace when you initialize QueryableEntityCoreCollectionView.
at Telerik.Windows.Data.QueryableProxy`1.get_Count() at Telerik.Windows.Data.QueryableEntityCoreCollectionView`1.UpdateTotalItemCount() at Telerik.Windows.Data.QueryableCollectionView..ctor(IEnumerable sourceCollection, Type itemType) at Telerik.Windows.Data.QueryableCollectionView..ctor(IEnumerable source) at Telerik.Windows.Data.QueryableEntityCoreCollectionView`1..ctor(DbContext dbContext, IQueryable`1 query, Collection`1 include)
To work this around, you can create a custom QueryableEntityCoreCollectionView class and override its UpdateTotalItemCount() method.
public class CustomQueryableEntityCoreCollectionView<T> : QueryableEntityCoreCollectionView<T> where T : class, new()
{
public CustomQueryableEntityCoreCollectionView(DbContext dbContext, IQueryable<T> query, Collection<string> include)
: base(dbContext, query, include)
{
}
protected override void UpdateTotalItemCount()
{
var sourceListProperty = typeof(QueryableCollectionView).GetProperty("SourceList", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
var sourceList = (IList)sourceListProperty.GetValue(this);
if (sourceList != null && !(sourceList is ICollectionView))
{
this.TotalItemCount = sourceList.Count;
}
else
{
var proxyProperty = typeof(QueryableEntityCoreCollectionView<T>).GetProperty("Proxy", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
var proxy = proxyProperty.GetValue(this);
if (proxy != null)
{
var dbSetProperty = proxy.GetType().GetProperty("DbSet");
var dbSet = dbSetProperty.GetValue(proxy) as DbSet<T>;
if (dbSet != null)
{
this.TotalItemCount = dbSet.Local.Count;
}
else
{
this.TotalItemCount = this.QueryableSourceCollection.Count();
}
}
}
}
}
If the autohiding feature of the taskbar is enabled and RadWindow is maximized, the taskbar is not displayed when the mouse is over the bottom of the screen.
This is observed also in RadTabbedWindow.
If the drop down get opened (which usually happens on text changed) before the ItemsSource is assigned, the no results presenter is never replaced with the list of results after the ItemsSource is set. This may happen if you delay the ItemsSource settings. A possible scenario is if you fetch your data from a service or using another type of async approach where the ItemsSource is assigned few moments after the TextChanged event was fired.
To work this around, you can manually update the Visibility of the items host or re-open the drop down after the ItemsSource is assigned. For example, you can create a custom RadAutoSuggestBox and override its OnPropertyChanged method. This will allow you to update the items host visibility on ItemsSource changed.
public class CustomAutoSuggestBox : RadAutoSuggestBox
{
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
{
base.OnPropertyChanged(e);
if (e.Property.Name == "ItemsSource")
{
var listBox = (RadListBox)GetTemplateChild("PART_ItemsHost");
listBox.Visibility = listBox.Items.Count > 0 ? Visibility.Visible : Visibility.Collapsed;
}
}
}
RadListBox allows you to navigate between the items using the arrow keys on the keyboard. To enable this, you will need to select any item in order to focus the control. Using touch input to select an item, instead of the mouse, is breaking the arrow keys navigation. Pressing up and down no longer navigates to the previous and next item.
To work this around, subscribe the RadListBox control to the TouchManager.Tap event and focus the tapped RadListBoxItem in the event handler.
public MainWindow()
{
InitializeComponent();
TouchManager.AddTapEventHandler(this.listBox, this.OnTap, true);
}
private void OnTap(object sender, TapEventArgs e)
{
var tapElement = (FrameworkElement)e.OriginalSource;
var item = tapElement.ParentOfType<RadListBoxItem>();
if (item != null)
{
item.Focus();
}
}
Most problematic issue when container can contains a container inside of it.
In mvvm demo project i modified load/save button to Clear diagram and display different content.
It works but after few click there is a recurrence call to update Z indices.
The reason to create such combination is to have hierarchy in diagram to display diagram from general view to detailed view.
The vertical scrollbar of RadGridView disappears in some cases when the last parent item is expanded and then collapsed. The issue reproduces only with the Flat GroupRenderMode and when UseLayoutRounding property is set to True.
The workaround is to avoid setting the UseLayoutRounding property to True.
Different foreground value is applied to elements, which are present inside RadBusyIndicator when using the Office2019 theme.
To work this around, set a new value to the Foreground property of the RadBusyIndicator control.