FAQ Database Discussion Community


How to change the background color of a TextView inside of an ActionMode

android,android-actionbar,styles,android-actionmode
I have a TextView inside of my action bar, like the following: I have logic configured to make it overlay the Toolbar with an ActionMode when I long-press on an item in the associated ListView. This ends up looking like the following: This is basically correct, except for the annoying...

Style expander header background color in App.xaml

c#,.net,wpf,styles,expander
I'm trying to create a global style for Expander in WPF. This is what I achieved so far: <Style TargetType="Expander"> <Setter Property="HeaderTemplate"> <Setter.Value> <DataTemplate> <Border Background="Red"> <ContentControl Content="{Binding}" /> </Border> </DataTemplate> </Setter.Value> </Setter> </Style> And this is how it looks: Not very satisfying. Question: How can I change the background...

WPF Button Background when IsEnabled = False

wpf,button,styles
I try to set a style for my button when it is not enabled so that the Background LinearGradientBrush is similar to the one set for the button when it is enabled. I have tried with Triggers but it seems that only the text Color is changing: <Application x:Class="RSPolar.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"...

WPF: Bind to property of a parent element

c#,wpf,xaml,binding,styles
I'm using a DataGrid and would like to introduce a style trigger for cells that sets the background color of the cell depending on the column's IsReadOnly property. I think there is some way to get from the cell level to the column level using RelativeSource (navigating all the way...