Bug report (I searched for similar issues and did not find one)
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
Expander Header should be completely Gone.
Copy the NoExpanderHeaderStyle from Documentation to the XAML tab and set that as HeaderStyle.
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: )
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?