WindowsCommunityToolkit icon indicating copy to clipboard operation
WindowsCommunityToolkit copied to clipboard

Visibility Property on ExpanderArrow

Open avknaidu opened this issue 8 years ago • 9 comments

I'm submitting a...

  • Feature request (UserVoice request: )

https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/33456421-visibility-on-togglebutton-for-header

Current behavior

current

Expected behavior

expected

avknaidu avatar Feb 26 '18 18:02 avknaidu

Interesting, I kind of like it. What's the use case?

cc @Odonno

nmetulev avatar Feb 26 '18 18:02 nmetulev

Yeah, like @nmetulev said, it is intriguing. But not sure to see the use case though.

In my point of view, it looks like a read-only mode where you remove the right for the user to toggle off/on. If the objective is to use the Expander uniquely without the Header, it feels useless because it means you only want this control for the animations which can be copied pretty easily using ImplicitAnimations. Of course, I may not see other use cases.

Odonno avatar Feb 26 '18 18:02 Odonno

This is a simple scenario that came up in my app. I have a list of Items ( Recordings to be precise) on my list view and upon tapping any item, I want to open another view with MediaTransportControls that will play these items. In this case,

  1. I need to build a UserControl / Custom Control
  2. Have 2 views one with my DataTemplate to show details of ListViewItem and another with MTC. ( I can use Expander here with ContentOverlay as my DataTemplate and Expanded Grid as my MTC. )
  3. Create Animations + Handle Sliding View from Up -> Bottom ( This is already available in Expander ).

Everything above when can be handled by Expander with just a property on the "Header". Which is anyways a Toggle button that has a Visibility Property, It is very simple for developers to use that.

Another use case is the Settings Bar in Windows 8.1. Only In App. For example if I want to show a List of Shortcuts my app uses, Instead of navigating to a different page, I can open the expander from the Right, Overlay on top of my Current shell. I can even give them option to Pin the Expander ( By adding the control inside my View itself ) and users never have to leave the Current Page. Better than a ContentDialog/MessageDialog that can be used as an alternate instead of navigating to different page for showing shortcuts.

avknaidu avatar Feb 26 '18 20:02 avknaidu

@nmetulev this may sound like a case for the new SwitchPresenter I was talking about...

michael-hawker avatar Feb 26 '18 20:02 michael-hawker

Looks like ViewSwitcher for UWP

Vijay-Nirmal avatar Feb 28 '18 15:02 Vijay-Nirmal

Here's the SwitchPresenter control I was talking about earlier which I have a prototype for working: https://github.com/Microsoft/UWPCommunityToolkit/issues/1908

michael-hawker avatar Mar 19 '18 20:03 michael-hawker

Just style the header section out.

skendrot avatar Mar 19 '18 21:03 skendrot

I think we can we close this now with #1918 implemented? If anything we could provide another sample in the sample app which shows an expander with a custom header.

michael-hawker avatar Apr 15 '18 04:04 michael-hawker

Agreed, closing issue

nmetulev avatar Apr 16 '18 05:04 nmetulev