question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[WinUI] Grid Bug !!

See original GitHub issue

Description

image

image

Steps to Reproduce

https://github.com/dsuny/MauiApp1GridBug

Link to public reproduction project repository

https://github.com/dsuny/MauiApp1GridBug

Version with bug

7.0.86

Last version that worked well

6.0

Affected platforms

Windows

Affected platform versions

net7.0-windows10.0.19041.0

Did you find any workaround?

Padding value change

Relevant log output

Microsoft.Maui.IViewHandler: Error: Unexpected exception in OnHandlerChangedCore.

System.ArgumentException: Value does not fall within the expected range. at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.IDependencyObjectMethods.SetValue(IObjectReference _obj, DependencyProperty dp, Object value) at Microsoft.UI.Xaml.DependencyObject.SetValue(DependencyProperty dp, Object value) at Microsoft.Maui.Platform.ViewExtensions.UpdateProperty(FrameworkElement platformControl, DependencyProperty property, Object value) at Microsoft.Maui.Platform.TextBlockExtensions.UpdatePadding(TextBlock platformControl, ILabel label) at Microsoft.Maui.Handlers.LabelHandler.MapPadding(ILabelHandler handler, ILabel label) at Microsoft.Maui.PropertyMapper2.<>c__DisplayClass5_0.<Add>b__0(IElementHandler h, IElement v) at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView) at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView) at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view) at Microsoft.Maui.Handlers.ViewHandler2.SetVirtualView(IView view) at Microsoft.Maui.Handlers.ViewHandler2.SetVirtualView(IElement view) at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view) at Microsoft.Maui.Handlers.ViewHandler2.SetVirtualView(IElement view) at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view) at Microsoft.Maui.Handlers.ViewHandler2.SetVirtualView(IElement view) at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) at Microsoft.Maui.Handlers.ContentViewHandler.UpdateContent(IContentViewHandler handler) at Microsoft.Maui.Handlers.ContentViewHandler.MapContent(IContentViewHandler handler, IContentView page) at Microsoft.Maui.PropertyMapper2.<>c__DisplayClass5_0.<Add>b__0(IElementHandler h, IElement v) at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView) at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView) at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view) at Microsoft.Maui.Handlers.ViewHandler2.SetVirtualView(IView view) at Microsoft.Maui.Handlers.ContentViewHandler.SetVirtualView(IView view) at Microsoft.Maui.Handlers.ViewHandler2.SetVirtualView(IElement view) at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) at Microsoft.Maui.Platform.StackNavigationManager.OnNavigated(Object sender, NavigationEventArgs e) at WinRT._EventSource_global__Microsoft_UI_Xaml_Navigation_NavigatedEventHandler.EventState.<GetEventInvoke>b__1_0(Object sender, NavigationEventArgs e) at ABI.Microsoft.UI.Xaml.Navigation.NavigatedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e) — End of stack trace from previous location — at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr) at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr) at ABI.Microsoft.UI.Xaml.Controls.IFrameMethods.Navigate(IObjectReference _obj, Type sourcePageType, Object parameter, NavigationTransitionInfo infoOverride) at Microsoft.UI.Xaml.Controls.Frame.Navigate(Type sourcePageType, Object parameter, NavigationTransitionInfo infoOverride) at Microsoft.Maui.Platform.StackNavigationManager.NavigateTo(NavigationRequest args) at Microsoft.Maui.Handlers.NavigationViewHandler.RequestNavigation(INavigationViewHandler arg1, IStackNavigation arg2, Object arg3) at Microsoft.Maui.CommandMapper2.<>c__DisplayClass6_0.<Add>b__0(IElementHandler h, IElement v, Object o) at Microsoft.Maui.CommandMapper.InvokeCore(String key, IElementHandler viewHandler, IElement virtualView, Object args) at Microsoft.Maui.CommandMapper.Invoke(IElementHandler viewHandler, IElement virtualView, String property, Object args) at Microsoft.Maui.Handlers.ElementHandler.Invoke(String command, Object args) at Microsoft.Maui.Controls.NavigationPage.Microsoft.Maui.IStackNavigation.RequestNavigation(NavigationRequest eventArgs) at Microsoft.Maui.Controls.NavigationPage.SendHandlerUpdateAsync(Boolean animated, Action processStackChanges, Action firePostNavigatingEvents, Action fireNavigatedEvents) at Microsoft.Maui.TaskExtensions.FireAndForget(Task task, Action1 errorCallback)

Issue Analytics

  • State:open
  • Created 2 months ago
  • Reactions:1
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Xyncgascommented, Jul 19, 2023

@dsuny are you new to MAUI? I am a fan of MAUI.Blazor

do you want to be friends and help each other? do you have a Telegram app link. I am studying how to program while making my own libraries as a hobby

1reaction
Xyncgascommented, Jul 18, 2023

In my opinion, MAUI layout libraries should not throw exceptions, my philosophy is, if number crunching generates a result that doesn’t meet the expectation, just simply return default (what’s default is for specification)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Border control display bug in a Grid (Windows) #14573
Description When I create a Grid layout with a Border in it, the Border is rendered weirdly, flowing off the bottom of the...
Read more >
[WinUI] Grid Bug !! · dotnet/maui@443d3a0
NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop. - [WinUI] Grid...
Read more >
CollectionView on .NET Maui doesn't show columns after 13
I setup the Collectionview with these settings and I am able to see the columns if I resize the WinUI. <CollectionView Grid.Row="1" Grid.Column= ......
Read more >
Window SizeToContent issue when child UserControl has ...
I have Window SizeToContent set to WidthAndHeight, because I want it's size to adjust to child control size (in this case UserSettingsView).
Read more >
Bug with sorting columns in grid with detail template
Bug - Latest column from parent grid becomes disabled for sorting. <TelerikGrid Data="salesTeamMembers" @ref="Grid" Sortable="true" FilterMode=@ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found