styles

Custom styled listbox - how can I keep the style for a selected item?

匆匆过客 提交于 2020-01-10 04:07:05
问题 I have a styled listbox. Listbox items change color when hovered over and when selected. Hover and select work fine. But when selecting an item then taking the mouse off it and coming back to hover over it causes it to go back to hover/unselected state even though it is still selected. How can I keep the listboxitem in a "selected" visual state? <Style x:Name="myListBoxItemStyle" TargetType="ListBoxItem"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ListBoxItem">

Style scrollbar css colorbox

一个人想着一个人 提交于 2020-01-07 08:32:20
问题 I want to style the scrollbar of the colorbox, showed when the content is larger than the screen resolution. I know how to do this in css (webkit browsers and IE), but I don't know in which part of the colorbox css I need to place the css scrollbar code. Who does know there to place it in? Ps. I use iframe: true in the colorbox 回答1: Add it to the colorbox's CSS in the top middle or bottom, it doesn't matter. 回答2: You would put it in the iframed document. 来源: https://stackoverflow.com

How Design a style in WPF radiobutton like checkbox

我是研究僧i 提交于 2020-01-07 03:50:11
问题 I want to have a radiobutton similar to checkbox, so I define a style in Dictionary file like: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfCheckBoxLikeRadiobutton"> <Style x:Key="MyRadioButton" TargetType="{x:Type RadioButton}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type RadioButton}"> <Grid> <CheckBox IsChecked="{Binding

User agent stylesheet overriding border styles

筅森魡賤 提交于 2020-01-07 02:26:23
问题 First off, let me say I am pretty new to coding in general, so please be specific in your responses =) I am having an issue with borders around images on a site I am working on. You can see the site here: http://eventswithvizability.ca/ I have 10 images rotating on page reload, you can see the HTML here: <SCRIPT LANGUAGE="Javascript"> function banner() { } ; b = new banner() ; n = 0 b[n++]= "<IMG name=randimg CLASS='aligncenter1'>" b[n++]= "<IMG name=randimg CLASS='aligncenter2'>" b[n++]= "

How to specify the background color of the context Menu

╄→гoц情女王★ 提交于 2020-01-07 02:16:22
问题 I use a context menu in an android App to prompt the user to select a Filter. The relevant code is: TextView someView = (TextView) findViewById(id.some_view); registerForContextMenu(someView); ... @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle("Select a Filter"); menu.add(0, 0, 0, "Filter1"); menu.add(0, 1, 1, "Filter2"); menu.add(0, 2, 2, "Filter3"); } @Override

How to specify the background color of the context Menu

此生再无相见时 提交于 2020-01-07 02:16:05
问题 I use a context menu in an android App to prompt the user to select a Filter. The relevant code is: TextView someView = (TextView) findViewById(id.some_view); registerForContextMenu(someView); ... @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle("Select a Filter"); menu.add(0, 0, 0, "Filter1"); menu.add(0, 1, 1, "Filter2"); menu.add(0, 2, 2, "Filter3"); } @Override

Remove black border style from ListView Selected item

耗尽温柔 提交于 2020-01-06 19:41:25
问题 I am trying to create a custom control like the one described in at: https://stackoverflow.com/a/13188979/637142 So far I have a listview as: <ListView Name="listBox1"> <!-- Place items horizontaly --> <ListView.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" ></StackPanel> </ItemsPanelTemplate> </ListView.ItemsPanel> <ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Style.Resources> <!-- Background for Selected ListViewItem --> <SolidColorBrush x

WPF ToolTip Style with dynamic LayoutTransform

坚强是说给别人听的谎言 提交于 2020-01-06 15:20:10
问题 I have an app that scales it's UI and I want to scale the ToolTips with it. I have tried doing this: <Style TargetType="{x:Type ToolTip}"> <Setter Property="LayoutTransform" Value="{DynamicResource scaleTransf}"/> ... </Style> ...where scaleTransf is a resource that I change via code: Application.Current.Resources["scaleTransf"] = new ScaleTransform(...); with: <ScaleTransform x:Key="scaleTransf" ScaleX="1" ScaleY="1"/> Most of the ToolTips do get scaled in size but some of them that are

How to add a hover background image style on a div the Angularjs way

霸气de小男生 提交于 2020-01-06 15:17:10
问题 I have a background image on a div that I want to have switch on hover. I can't change the class because I'm using a bound property to fill in the information. As far as I know I don't see any way to add hover with styles inside of the html and I found a way to do it in jquery but it just doesn't seem like the angular way. 回答1: Method #1 : No controller, everything in template. <div ng-init="bg = ''" ng-mouseenter="bg = 'http://www.gravatar.com/avatar/b76f6e92d9fc0690e6886f7b9d4f32da?s=100'"

Change background, textcolor of AlertDialog

跟風遠走 提交于 2020-01-06 12:26:11
问题 I try to change background and textcolor of AlertDialog. But I can change only color of title with android:windowTitleStyle Activity: AlertDialog.Builder adb = new AlertDialog.Builder(new ContextThemeWrapper(this, R.style.AlertDialogCustom)); styles.xml style name="AlertDialogCustom" parent="Holo.Theme.Sherlock" How can I do that? Thanks. 回答1: adb.setMessage(Html.fromHtml("<font color='#FF0000'><b>John:</b></font>"+"How are you?")) this is for changing text color You can create you own dialog