CommunityToolkit/WindowsCommunityToolkit

[Sample App] Commands for Sample Pages should have more options for manipulation

Open

#1,960 建立於 2018年4月9日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)C# (1,403 fork)batch import
help wantedno-recent-activity :chart_with_downwards_trend:sample app 🖼

倉庫指標

Star
 (5,708 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I'm submitting a...

  • Sample app request

Should be related to general improvements #1438 and originally needed by PR #1896.

Current behavior

A sample page can only add new commands for the sample at the commandbar, but outside of the user clicking to invoke them has no way to interact with the button. This makes it hard to enable/disable buttons, hide/show buttons, or have toggle buttons.

Expected behavior

We should extend the SampleCommand and RegisterNewCommand paradigms to allow for:

  • Returning the SampleCommand on RegisterNewCommand
  • Shell CommandBar listens to updates to properties for Label and new Parameter, IsVisible, and IsEnabled properties on the SampleCommand
  • P2: Provide the option when registering to set the button type to a 'togglable' one.

貢獻者指南