Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am implementing the bottomNavigationBar on the Uno Platform for my app. I have everything else working- but am having trouble changing either the color or the opacity of the ripple effect when an icon is pressed. I either need to change the opacity or the color of the effect. What is the name of the property I need to modify- and is it a color or percentage? Thanks for your help!

Here is a sample of the styles I have tried:

        <SolidColorBrush x:Key="NavigationViewItemForegroundSelected" Color="Green"/>
        <SolidColorBrush x:Key="NavigationViewItemForegroundSelectedPointerOver" Color="Green"/>
        <SolidColorBrush x:Key="NavigationViewItemForegroundPressed" Color="Green"/>
        <SolidColorBrush x:Key="NavigationViewItemForegroundSelectedPressed" Color="Green"/>
        <SolidColorBrush x:Key="NavigationViewSelectionIndicatorForeground"  Color="Blue" />
        <Color x:Key="MaterialPrimaryColor">Green</Color>
        <Color x:Key="MaterialSecondaryColor">LightGreen</Color>
        <Color x:Key="MaterialBottomNavForegroundColor">Green</Color>
        <Color x:Key="MaterialBottomNavUncheckedForegroundBrush">Blue</Color>
        <SolidColorBrush x:Key="MaterialBottomNavBackgroundBrush" Color="#FFF2F2F2"/>
question from:https://stackoverflow.com/questions/65621398/uno-material-bottomnavigationbar

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
367 views
Welcome To Ask or Share your Answers For Others

1 Answer

The resource to change the ripple effect color is MaterialBottomNavPressedBrush

Here's how you can find out which resources apply where:

  1. Look up the style on github
  2. Find in the XAML template where the resource is used
  3. Note the name
  4. Override it in your application's XAML

Here's where it is for this example github link


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...