Skip to content

[regression/8.0.3] AdaptiveTrigger does not work #19197

Closed
@JPfahl

Description

@JPfahl

Description

Adaptive triggers do not work.

Steps to Reproduce

Add the following style:

  <Style TargetType="StackLayout">
      <Setter Property="VisualStateManager.VisualStateGroups">
          <VisualStateGroupList>
              <VisualStateGroup>
                  <VisualState x:Name="Vertical">
                      <VisualState.StateTriggers>
                          <AdaptiveTrigger MinWindowWidth="0" />
                      </VisualState.StateTriggers>
                      <VisualState.Setters>
                          <Setter Property="Orientation"
                              Value="Vertical" />
                      </VisualState.Setters>
                  </VisualState>
                  <VisualState x:Name="Horizontal">
                      <VisualState.StateTriggers>
                          <AdaptiveTrigger MinWindowWidth="800" />
                      </VisualState.StateTriggers>
                      <VisualState.Setters>
                          <Setter Property="Orientation"
                              Value="Horizontal" />
                      </VisualState.Setters>
                  </VisualState>
              </VisualStateGroup>
          </VisualStateGroupList>
      </Setter>
  </Style>

Using the following xaml does not respond to the window width changing:

<StackLayout>
    <Labe Text="a"/>
    <Label Text="b"/>
    <Label Text="c"/>
</StackLayout>

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows

Affected platform versions

windows10.0.22621.0, android 33, ios 17

Did you find any workaround?

No

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions