View Issue Details

IDProjectCategoryView StatusLast Update
0001661NoesisGUIC# SDKpublic2020-05-08 10:37
Reporterai_enabled Assigned Tosfernandez  
PrioritynormalSeveritymajor 
Status resolvedResolutionno change required 
Product Version3.0.0 
Target Version3.0.0Fixed in Version3.0.0 
Summary0001661: VisualStateManager issues with transitions, initial state name through databinding
Description

Hi guys:

  1. useTransitions: false in GoToState/GoToElementState seems to be broken—please verify. I was able to reproduce this issue consistently but it's hard to provide a test sample right now.

  2. another problem is that when the initial data binding applies the VSM is using the transition to the bound state name. In 2.2 and before it transferred to the initial state without the transition.


<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="VisibilityStates">
<VisualStateGroup.Transitions>
<VisualTransition To="Collapsed"
GeneratedDuration="0:0:0.25" />
<VisualTransition To="Visible"
GeneratedDuration="0:0:0.25" />
</VisualStateGroup.Transitions>

            <VisualState x:Name="Visible" />
            <VisualState x:Name="Collapsed">
                <Storyboard>
                    <DoubleAnimation Storyboard.TargetProperty="Opacity"
                                     To="0" />
                </Storyboard>
            </VisualState>
        </VisualStateGroup>
    </VisualStateManager.VisualStateGroups>

    <i:Interaction.Triggers>
        <ei:DataTrigger Binding="{Binding VisualStateName}" Value="Visible">
            <ei:GoToStateAction StateName="Visible" />
        </ei:DataTrigger>
        <ei:DataTrigger Binding="{Binding VisualStateName}" Value="Collapsed">
            <ei:GoToStateAction StateName="Collapsed" />
        </ei:DataTrigger>
    </i:Interaction.Triggers>

Regards!

PlatformAny

Activities

ai_enabled

ai_enabled

2020-04-24 23:44

updater   ~0006272

Guys, do you need anything from me to help investigate this issue?

ai_enabled

ai_enabled

2020-04-25 02:06

updater   ~0006273

So the workaround I've used is to revert the default state to "Collapsed" (so the layout root by default has Opacity="0" and when it needs to go to collapsed state there is no transition as it's already in it). It's just a weird workaround.

sfernandez

sfernandez

2020-04-26 12:53

manager   ~0006276

The issue is clear, no need for more info to investigate it, thanks.

sfernandez

sfernandez

2020-05-04 14:15

manager   ~0006312

One thing I noticied in your xaml is that you are using DoubleAnimation to define the VisualState, and you are not setting the Duration, so it takes the default value of 1 second. Is it possible that transition is what you are seeing?

I created this test in WPF and we behave exactly like them: https://www.noesisengine.com/xamltoy/561762d3aa360ac9478be868780d5ec0

ai_enabled

ai_enabled

2020-05-08 01:05

updater   ~0006330

Thank you for your help, Sergio!
It works fine with both DoubleAnimation (when I've added Duration="0") to it and with DoubleAnimationUsingKeyFrames (when I've added KeyTime="0" to the key frame).
For some reason it was not required in NoesisGUI 2.x and before.

You can close this ticket.

Regards!

Issue History

Date Modified Username Field Change
2020-04-20 17:53 ai_enabled New Issue
2020-04-20 17:53 ai_enabled Summary VisualStateManager issues with transitions or data bound state => VisualStateManager issues with transitions, initial state name through databinding
2020-04-21 18:03 sfernandez Assigned To => sfernandez
2020-04-21 18:03 sfernandez Status new => assigned
2020-04-21 18:03 sfernandez Target Version => 3.0.0
2020-04-24 23:44 ai_enabled Note Added: 0006272
2020-04-25 02:06 ai_enabled Note Added: 0006273
2020-04-26 12:53 sfernandez Note Added: 0006276
2020-05-04 14:15 sfernandez Status assigned => feedback
2020-05-04 14:15 sfernandez Note Added: 0006312
2020-05-08 01:05 ai_enabled Note Added: 0006330
2020-05-08 01:05 ai_enabled Status feedback => assigned
2020-05-08 10:37 sfernandez Status assigned => resolved
2020-05-08 10:37 sfernandez Resolution open => no change required
2020-05-08 10:37 sfernandez Fixed in Version => 3.0.0