Search code examples
c#uwpuwp-xamlxamarin.uwpflyout

Layout cycle detected. Layout could not complete, For Flyout in UWP


I have 8 Grid rows populated via foreach loops in Flyout.

When the content was too great, it started to crash with the obscure 'layout cycle detected' error..

If I remove one row it is working fine.


Solution

  • I have applied below style for Flyout the it's working fine now.

    <Style x:Key="FlyoutPresenterStyle" TargetType="FlyoutPresenter">
       <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
       <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value=" Disabled "/>
       <Setter Property="ScrollViewer.VerticalScrollMode" Value="Disabled" />
       <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled" />
    </Style>