Skip to content
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

Regression with NavigationView now producing binding error when minimising it #9384

Closed
beeradmoore opened this issue Mar 2, 2024 · 8 comments
Labels
area-NavigationView NavView control bug Something isn't working closed-Fixed Described behavior has been fixed. fix-released The fix has been in a release (experimental, preview, stable, or servicing). Regression team-Controls Issue for the Controls team
Milestone

Comments

@beeradmoore
Copy link

beeradmoore commented Mar 2, 2024

Describe the bug

Updating my app to the latest WinUI version (1.5.240227000) I noticed I started getting a binding warning when I run it. The previous version (1.4.240211001) does not have this issue.

Error: Converter failed to convert value of type 'Windows.Foundation.IReference`1<Microsoft.UI.Xaml.GridLength>' to type 'Double'; BindingExpression: Path='TemplateSettings.CompactPaneGridLength' DataItem='Microsoft.UI.Xaml.Controls.SplitView'; target element is 'Microsoft.UI.Xaml.Media.Animation.SplineDoubleKeyFrame' (Name='null'); target property is 'Value' (type 'Double').

I was able to keep deleting code until I got it to dissapear and I got an app layout down to a single NavigationView.

<?xml version="1.0" encoding="utf-8"?>
<Window
    x:Class="NavViewBindingIssue.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:NavViewBindingIssue"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
    mc:Ignorable="d">
    <muxc:NavigationView>

    </muxc:NavigationView>
</Window>

If you launch this there will be no binding issues. If you minmise the nav by clicking the hamburger button it will generate the above binding issue.

Additionally if you make your nav view this it will show the binding error on launch.

    <muxc:NavigationView PaneDisplayMode="LeftCompact">
    
    </muxc:NavigationView>

Steps to reproduce the bug

  1. Create new WinUI project
  2. Update nugets to latest versions
  3. Change MainWindow.xaml to have the above NavigationView
  4. (fix any issues of not compiling because you remove the normal button)
  5. Run and toggle the side menu to see the binding error output on the debug console (and on screen helper bar)
  6. Roll back one version to 1.4.240211001 and test again, binding issue is now gone.

Expected behavior

No binding errors.

Screenshots

N/A

NuGet package version

WinUI 3 - Windows App SDK 1.5.0: 1.5.240227000

Windows version

Windows 11 (23H2): Build 22631

Additional context

N/A

@beeradmoore beeradmoore added the bug Something isn't working label Mar 2, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Mar 2, 2024
Copy link

github-actions bot commented Mar 2, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@molesmoke
Copy link

I'm also seeing this if MAUI is built against WinUI 3 v1.5.240227000

@27k1
Copy link

27k1 commented Mar 22, 2024

I get the same problem with WINUI 3 all latest nuGet packages. This issue is not closed, Please reopen.

@kmgallahan
Copy link
Contributor

Please reopen.

@27k1 It isn't closed.

@parko65
Copy link

parko65 commented Mar 26, 2024

Issue is still present in 1.5.240311000

@MPITech
Copy link

MPITech commented Mar 31, 2024

Confirmed, happens here as well still in 1.5.240311000.

@ranjeshj
Copy link
Contributor

ranjeshj commented Apr 4, 2024

The offending piece is the makrup below in the SplitView template - we are trying to bind a gridlength to translatex - which are not compatible types.

<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PaneClipRectangleTransform" Storyboard.TargetProperty="TranslateX">
      <SplineDoubleKeyFrame KeyTime="{StaticResource SplitViewPaneAnimationCloseDuration}" KeySpline="0.0,0.35 0.15,1.0" Value="{Binding TemplateSettings.CompactPaneGridLength, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
  </DoubleAnimationUsingKeyFrames>

@llongley llongley added this to the WinAppSDK 1.6 milestone Apr 10, 2024
@llongley llongley added the closed-Fixed Described behavior has been fixed. label Apr 10, 2024
@kanyu
Copy link

kanyu commented May 31, 2024

Hi, I'm using 1.5.240428000 in WinUI3 and this problem has still happened. When does 1.6 come out? Thanks

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label May 31, 2024
@codendone codendone added fix-released The fix has been in a release (experimental, preview, stable, or servicing). and removed needs-triage Issue needs to be triaged by the area owners labels Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NavigationView NavView control bug Something isn't working closed-Fixed Described behavior has been fixed. fix-released The fix has been in a release (experimental, preview, stable, or servicing). Regression team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests