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

Categories

0 votes
361 views
in Technique[技术] by (71.8m points)

uno platform - Uno Material bottomNavigationBar

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

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

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...