CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.89k stars 1.38k forks source link

MUXC NavigationView Header displays unnecessary indentation #4284

Closed HavenDV closed 3 years ago

HavenDV commented 3 years ago

Current behavior

image I'm not sure what exactly the problem is. The problem is either indentation or default vertical alignment. This showed up after updating to 3.11.0-dev.242 from about 3.10.0-dev.500

Expected behavior

image

How to reproduce it (as minimally and precisely as possible)

xmlns:muxc="using:Microsoft.UI.Xaml.Controls"

<muxc:NavigationView
  IsSettingsVisible="False"
  AlwaysShowHeader="True"
  IsTabStop="False" 
  IsPaneToggleButtonVisible="True" 
  IsPaneOpen="True" 
  IsPaneVisible="True"
  PaneDisplayMode="LeftCompact"
  >
  <muxc:NavigationView.Header>
    <TextBlock
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        Text="Test"
        />
  </muxc:NavigationView.Header>
</muxc:NavigationView>

Environment

NuGet Package(s):

Package Version(s):

<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
      <!-- 
            If, in the same solution, you are referencing a project that uses https://github.com/onovotny/MSBuildSdkExtras,
            you need to make sure that the version provided here matches https://github.com/onovotny/MSBuildSdkExtras/blob/master/Source/MSBuild.Sdk.Extras/DefaultItems/ImplicitPackages.targets#L11.
            This is not an issue when libraries are referenced through nuget packages. See https://github.com/nventive/Uno/issues/446 for more details.
            -->
      <Version>6.2.12</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.Toolkit.Uwp.UI">
      <Version>7.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Core">
      <Version>7.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.DataGrid">
      <Version>7.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Layout">
      <Version>7.1.0</Version>
    </PackageReference>
    <PackageReference Include="Microsoft.UI.Xaml">
      <Version>2.7.0</Version>
    </PackageReference>

Windows 10 Build Number:

App min and target version:

Device form factor:

Visual Studio version:

Additional context

Problems appears after upgrade Microsoft.UI.Xaml from 2.6.0-prerelease.210430001 to 2.6.0

ghost commented 3 years ago

Hello HavenDV, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

michael-hawker commented 3 years ago

Hi @HavenDV, is there a reason you're reporting this on the Toolkit repo instead of the WinUI repo?

HavenDV commented 3 years ago

Hi. No, my mistake.