New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisualStateGroup not working #72

Open
Marv51 opened this Issue Dec 4, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@Marv51

Marv51 commented Dec 4, 2018

  • .NET Core Version: 3.0 Preview1 (3.0.100-preview-009812)
  • Windows version: win10 1809 17763
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: No

Problem description:
This is probably a know issue of the first preview, very excited about this thing by the way!

Running my app, I get exceptions for windows that contain a System.Windows.VisualStateGroup(only tested via xaml). See below.
I had this on three different windows and removing the VisualStateGroup fixes it. (That of course also removes the functionality)

I guess this is not yet done? Known Bug? Or something real?

Actual behavior:
System.Windows.Markup.XamlParseException: "'Set connectionId threw an exception.' Line number '11' and line position '14'."
Inner Exception:
InvalidCastException: Unable to cast object of type 'System.Windows.VisualStateGroup' to type 'System.Windows.Shapes.Ellipse'.

Expected behavior:
Should work as it does in dotnet framework.

Minimal(ish) repro:

<Grid Name="TheEllipse" MouseUp="TheEllipse_MouseUp">
    <VisualStateManager.VisualStateGroups>
        <VisualStateGroup Name="MouseStates">
            <VisualState Name="MouseEnter">
                <Storyboard>
                    <ColorAnimation To="#A1A1A1" Duration="00:00:00.3" Storyboard.TargetName="BackFill" Storyboard.TargetProperty="(SolidColorBrush.Color)" />
                </Storyboard>
            </VisualState>
        </VisualStateGroup>
   </VisualStateManager.VisualStateGroups>
   <Ellipse Stroke="Black" StrokeThickness="1">
       <Ellipse.Fill>
           <SolidColorBrush x:Name="BackFill" Color="#F1F1F1" />
       </Ellipse.Fill>
   </Ellipse>
</Grid>

@rladuca rladuca added the bug label Dec 4, 2018

@rladuca rladuca added this to the 3.0 milestone Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment