I am having following exception on my adaptivegridview of uwp community toolkit
"System.ArgumentException: Value does not fall within the expected range. \r\n at Windows.UI.Xaml.FrameworkElement.SetBinding(DependencyProperty dp, BindingBase binding)\r\n at Microsoft.Toolkit.Uwp.UI.Controls.AdaptiveGridView.DetermineOneRowMode()\r\n at Microsoft.Toolkit.Uwp.UI.Controls.AdaptiveGridView.OnLoaded(Object sender, RoutedEventArgs e)"
XAML
<controls:AdaptiveGridView Name="AllVideosGridView"
OneRowModeEnabled="True"
MaxHeight="260"
ScrollViewer.HorizontalScrollMode="Enabled"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
ItemClick="AllVideosGridView_ItemClick"
Style="{StaticResource MainGridView}"
<...data template and other stuff...>
</controls.........>
the error occurs due to property OneRowModeEnabled to True, and if I remove that property it works fine and after app runs and then I set this property to true, while app is running then it doesn't show any exception and gridview goes to one row mode as it should.
Also the code behind doesn't matter, because I tried to commend the code behind which initializes the itemsource, but this exception still occurs.