Skip to content

如何修改SideMenu左边的颜色 #1210

Answered by Yopler
LickBag asked this question in Q&A
Discussion options

You must be logged in to vote

Hi 🖐,

There is many way to do so ! But first, the border is define on the style SideMenuBaseStyle - line 54 and the color change in the Style.Triggers in the same style. We can see that the color choose by default is the BorderBrush Color and that it chance to PrimaryBrush color.

The easiest way but maybe also the ugliest way to modify the selected color is to change the PrimaryBrush color in the SideMenu.Resources :

<hc:SideMenu>
        <hc:SideMenu.Resources>
            <SolidColorBrush x:Key="PrimaryBrush" Color="{DynamicResource BorderColor}"/>
        </hc:SideMenu.Resources>
        <hc:SideMenuItem Header="Item">
            <hc:SideMenuItem Header="Item"/>
            <hc:SideMe…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LickBag
Comment options

Answer selected by LickBag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants