Skip to content

Conversation

punker76
Copy link
Member

@punker76 punker76 commented Dec 30, 2017

What changed?

HamburgerMenu

  • Renaming:
    • HamburgerListBoxItemStyle -> HamburgerMenuItemStyle
    • HamburgerListBoxStyle -> HamburgerMenuListStyle
  • Revert back to UWPCommunityToolkit style (update template to keep options visible)
    • Move template to HamburgerMenuTemplate resource dictionary
    • Add margins
    • Vertically stretch the menu items of the hamburger menu
  • Change inner ListBox scrolling (CanContentScroll)
  • Add ItemContainerStyle and OptionsItemContainerStyle properties. This makes it easier to change the inner styles for the items (and option items)^
  • MinHeight of the menu items should be 0
  • HamburgerMenuImageItem: Downgrade thumbnail property from BitmapImage to subclass ImageSource
  • Introduce ItemInvoked event (as an alternative to ItemClick and OptionsItemClick)
  • SelectionIndicator which can be enabled with the new ShowSelectionIndicator dependency property
  • Improved item FocusVisualStyle
    • Add new (readonly) ItemFocusVisualStyle dependency property which will be re-created if one of these properties are changed: OpenPaneLength, CompactPaneLength and IsPaneOpen.
    • Default template is HamburgerMenuItemFocusVisualTemplate.
    • This FocusVisualStyle can be override at the HamburgerMenuItem style by setting the FocusVisualStyle property.
  • Reorganize Hamburger sample: shows now Default style, Creators Update style and a sample with the MaterialDesignInXaml Ripple control

ToggleSwitch

  • New ContentPadding dependency property. Add this new property to change the padding of the inner content in an easy way.

ItemHelper

  • New helper class with Brush attached properties for mouse interaction. These properties can be used with HamburgerMenuItem, ListBoxItem, ListViewItem, TreeViewItem and ComboBoxItem.
    • ActiveSelectionBackgroundBrush default AccentColorBrush
    • ActiveSelectionForegroundBrush default AccentSelectedColorBrush
    • DisabledBackgroundBrush default x:Null
    • DisabledForegroundBrush default GrayNormalBrush
    • DisabledSelectedBackgroundBrush default GrayBrush7
    • DisabledSelectedForegroundBrush default AccentSelectedColorBrush
    • HoverBackgroundBrush default AccentColorBrush3
    • HoverSelectedBackgroundBrush default AccentColorBrush
    • SelectedBackgroundBrush default AccentColorBrush2
    • SelectedForegroundBrush default AccentSelectedColorBrush

mahapps_hamburger

2018-01-08_16h34_14

2018-01-08_16h34_19

2018-01-08_16h34_22

Closes #2931
Closes #2975
Closes #2979

  - Update template to keep options visible
  - Change inner ListBox scrolling (CanContentScroll)
  - Add ItemContainerStyle and OptionsItemContainerStyle properties
  - This makes it easier to change the inner styles for the items (and option items)
@punker76 punker76 added this to the 1.6.0 milestone Dec 30, 2017
@punker76 punker76 self-assigned this Dec 30, 2017
  - Move template to HamburgerMenuTemplate resource dictionary
  - Add margins
  - Vertically stretch the menu items of the hamburger menu
HamburgerMenu:
  HamburgerListBoxItemStyle -> HamburgerMenuItemStyle
  HamburgerListBoxStyle -> HamburgerMenuListStyle
  - `ListItemHelper.ActiveSelectionBackgroundBrush` default `AccentColorBrush`
  - `ListItemHelper.ActiveSelectionForegroundBrush` default `AccentSelectedColorBrush`
  - `ListItemHelper.DisabledForegroundBrush` default `GrayNormalBrush`
  - `ListItemHelper.DisabledSelectedBackgroundBrush` default `GrayBrush7`
  - `ListItemHelper.DisabledSelectedForegroundBrush` default `AccentSelectedColorBrush`
  - `ListItemHelper.MouseOverBackgroundBrush` default `AccentColorBrush3`
  - `ListItemHelper.SelectedBackgroundBrush` default `AccentColorBrush2`
  - `ListItemHelper.SelectedForegroundBrush` default `AccentSelectedColorBrush`
New brush for hovered selected items: HoverSelectedBackgroundBrush
Fix for all: Hovered background if selected background was not set
Adjusted brushes for ListBox, ListView, TreeView, ComboBox
@punker76 punker76 changed the title WIP HamburgerMenu changes WIP HamburgerMenu and Item selection/hover brush improvements Jan 4, 2018
…ew ShowSelectionIndicator dependency property
  Add new (readonly) ItemFocusVisualStyle dependency property which will be re-created if one of these properties are changed: OpenPaneLength, CompactPaneLength and IsPaneOpen
  It will be used the default control template HamburgerMenuItemFocusVisualTemplate.
  This FocusVisualStyle can be override at the HamburgerMenuItem style by setting the FocusVisualStyle property.
  Add this new property to change the padding of the inner content in an easy way.
@punker76 punker76 changed the title WIP HamburgerMenu and Item selection/hover brush improvements HamburgerMenu and Item selection/hover brush improvements Jan 8, 2018
@punker76 punker76 merged commit 6536bbb into develop Jan 8, 2018
@punker76 punker76 mentioned this pull request Jan 8, 2018
@amkuchta
Copy link
Contributor

amkuchta commented Jan 8, 2018

clapping

@amkuchta
Copy link
Contributor

@punker76 how do I expose HamburgerMenuItemStyle so that I can create my own HamburgerMenuCreatorsItemStyle as you have done in HamburgerMenuCreatorsUpdate.xaml? Should we consider making both HamburgerMenuCreatorsItemStyle and HamburgerMenuCreatorsStyle out-of-the-box styles for ease of use?

@punker76 punker76 deleted the feature/HamburgerMenu_UWPCommunityToolkit_CreatorsStyle_pr2975_i2931 branch January 11, 2018 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants