dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.13k stars 1.74k forks source link

[foldable] `SpanModeStateTrigger` not responding to span/unspan events #11245

Open conceptdev opened 1 year ago

conceptdev commented 1 year ago

Description

Implementing a state trigger with TwoPaneView doesn't seem to work. Could be related to #5852 since it's probably an event not getting fired somewhere; might be fixed by same code too 🤞

Steps to Reproduce

  1. Repros with the Sample App in the .NET MAUI source repo
  2. Other Concepts -> Foldable -> shows a view with a TwoPaneView
  3. Placing the XAML below on the Pane2 StackLayout
 <VisualStateManager.VisualStateGroups>
    <VisualStateGroup>
        <VisualState x:Name="Single">
            <VisualState.StateTriggers>
                <foldable:SpanModeStateTrigger SpanMode="SinglePane" />
            </VisualState.StateTriggers>
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="DarkGreen" />
            </VisualState.Setters>
        </VisualState>
        <VisualState x:Name="DualLand">
            <VisualState.StateTriggers>
                <foldable:SpanModeStateTrigger SpanMode="Wide" />
            </VisualState.StateTriggers>
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="Yellow" />
            </VisualState.Setters>
        </VisualState>
        <VisualState x:Name="DualPort">
            <VisualState.StateTriggers>
                <foldable:SpanModeStateTrigger SpanMode="Tall" />
            </VisualState.StateTriggers>
            <VisualState.Setters>
                <Setter Property="BackgroundColor" Value="Pink" />
            </VisualState.Setters>
        </VisualState>
    </VisualStateGroup>
</VisualStateManager.VisualStateGroups>

Link to public reproduction project repository

https://github.com/dotnet/maui

Version with bug

7.0 Release Candidate 2

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 12L

Did you find any workaround?

No response

Relevant log output

No response

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

Zhanglirong-Winnie commented 10 months ago

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 1.1. Can repro this issue.