Windowscommunitytoolkit: Cannot Remove Expander Header based on Docs

Created on 2 Jul 2018  路  6Comments  路  Source: windows-toolkit/WindowsCommunityToolkit

I'm submitting a...



Bug report (I searched for similar issues and did not find one)



Current behavior


According to Expander Docs, Issue #1851 , PR #1918 we can style the header and remove it out completely. However it does not work as expected. When you add the style resource to the page and add the HeaderStyle to Expander from the docs, The Header will be removed but the allocated 40px will still be there because of

https://github.com/Microsoft/WindowsCommunityToolkit/blob/1a560bb3178a8ddafe29923d773f02d26b73a697/Microsoft.Toolkit.Uwp.UI.Controls/Expander/Expander.xaml#L600-L609

Expected behavior


Expander Header should be completely Gone.

Minimal reproduction of the problem with instructions


Copy the NoExpanderHeaderStyle from Documentation to the XAML tab and set that as HeaderStyle.

Environment

Nuget Package(s): Microsoft.Toolkit.Uwp.UI.Controls

Package Version(s): 3.0.0

Windows 10 Build Number:
- [ ] Creators Update (15063)
- [x] Fall Creators Update (16299)
- [x] April 2018 Update (17134)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Creators Update (15063)
- [x] Fall Creators Update (16299)
- [x] April 2018 Update (17134)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [ ] 2017 Preview (version: )

controls help wanted need documentation

All 6 comments

But I have one question, what's the point of having an Expander without Header?

@Odonno It was already discussed Here

Are you saying this is a bug with the docs or the control?
The following style should work just fine

    <Style TargetType="ToggleButton">
      <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

Or even

    <Style TargetType="ToggleButton">
      <Setter Property="MinHeight" Value="0"/>
      <Setter Property="Height" Value="0"/>
    </Style>

@skendrot I already did that while using nuget packages. I think we should update the docs.

Think this may be a regression based on the restyle work done on the Expander afterwards.

@shweaver-MSFT?

@avknaidu, could you submit a PR to update the docs?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

achabill picture achabill  路  46Comments

hermitdave picture hermitdave  路  78Comments

deltakosh picture deltakosh  路  55Comments

WilliamABradley picture WilliamABradley  路  33Comments

hoangwy picture hoangwy  路  36Comments