styles

Android how to programmatically set Button stroke and radius

混江龙づ霸主 提交于 2019-12-25 11:53:11
问题 I have this activity with 48 Button that the user can touch and change text and background color. I have edited the style of the default Buttons like this But when the user change the background color i have this bad result These are the xmls that style the dafault Buttons buttons.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/button_pressed" android:state_pressed="true" /> <item android

WPF ListView: How to style selected items with rounded corners like in Explorer

試著忘記壹切 提交于 2019-12-25 05:28:07
问题 This is a link for a question asked before, which concerns a TreeView: WPF TreeView: How to style selected items with rounded corners like in Explorer My question is : How to migrate this Solution on a ListView ? The answers are a little disordered, so I didn't understand what's happening there ! 回答1: I thought that question sounded familiar. :) So, you should just be able to use the same code, but then use Visual Studio to Find and Replace TreeView to ListView . Of course there are a few

WPF: the style of control does not work unless the control template created for style

老子叫甜甜 提交于 2019-12-25 05:22:24
问题 It almost gets me mad in recent days. I have a textbox and the style in xaml file. But the style without a control template cannot take effect on textbox. Whereas, a control template works, but control template seems to overwrite the textbox totally, the default behaviors loses of textbox such as editing, inputing or selecting... Here is content of xaml with the control template: <Style TargetType="{x:Type TextBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Border Name=

fusion table can not show two layers if we add different styles to the two layers

心不动则不痛 提交于 2019-12-25 05:13:54
问题 Due to the limit of 5 fusion table layers and 5 styles of one fusion table layer, I have to try it as: use 5 fusion table layers and each one use two styles, then I can get to my purpose: show 10 different styles in a map. But after I implemented, I found it only show the first fusion table layer. Then I wrote a testing case to check why. And found: If we set styles in two layers, only the first layer can be displayed and the second one is gone. If I set style for one layer, it works well.

Exception: “Missing key value on ‘Storyboard’ object.” with styled triggers

纵然是瞬间 提交于 2019-12-25 04:56:32
问题 I'm restyling a button, and that includes providing a controlTemplate and also adding some triggers (for mouseenter and mouseleave). My XAML is as follows: <Style TargetType="Button"> <Style.Resources> <Color x:Key="ForeColour" R="128" G="128" B="128" A="255"/> <Color x:Key="BackColour" R="211" G="211" B="211" A="255"/> <Color x:Key="GlowColour" R="30" G="144" B="255" A="255"/> <SolidColorBrush Color="{StaticResource ResourceKey=ForeColour}" x:Key="ForeBrush"/> <LinearGradientBrush x:Key=

Exception: “Missing key value on ‘Storyboard’ object.” with styled triggers

最后都变了- 提交于 2019-12-25 04:56:14
问题 I'm restyling a button, and that includes providing a controlTemplate and also adding some triggers (for mouseenter and mouseleave). My XAML is as follows: <Style TargetType="Button"> <Style.Resources> <Color x:Key="ForeColour" R="128" G="128" B="128" A="255"/> <Color x:Key="BackColour" R="211" G="211" B="211" A="255"/> <Color x:Key="GlowColour" R="30" G="144" B="255" A="255"/> <SolidColorBrush Color="{StaticResource ResourceKey=ForeColour}" x:Key="ForeBrush"/> <LinearGradientBrush x:Key=

asp.net datalist - change styling

你。 提交于 2019-12-25 04:53:33
问题 <asp:DataList ID="ItemsList" RepeatDirection="Vertical" runat="server"> <ItemTemplate> <asp:LinkButton ID="SecondLevelItem" runat="server" CommandName="second" OnCommand="SecondLevelItem_Onclick" CommandArgument="<%# Container.DataItem %>" Text="<%# Container.DataItem %>" > </asp:LinkButton> </ItemTemplate> </asp:DataList> everything works fine. except that I do not have any control over the styling on the items. I mean I have the styling on the datalist externally but I want to add some

IE equivalent to -webkit-appearance?

荒凉一梦 提交于 2019-12-25 04:34:09
问题 I wouldn't ask this question if I could find any information on this anywhere. I have checked w3schools, this site, and google. Nothing. So, is there a css -ms equivalent to -webkit-appearance? 回答1: By simply Googling " CSS appearance MDN " we get Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit) Basic support 1.0 (Yes) 1.0 (1.7 or earlier) No support ? 3.0 -webkit -moz[1] -webkit You can easily conclude that there is no even basic support in Internet Explorer for

Custom Control Styling/Triggers

隐身守侯 提交于 2019-12-25 04:04:12
问题 I'm trying to make a custom control that consists of several buttons and a couple labels, but the buttons are supposed to be invisible, showing only the content within them. I can get rid of the border, background, etc by setting them to Transparent. But whenever I MouseOver them the default windows hover effect shows the whole button again. I've tried numerous guides on custom controls, but ultimately cannot figure out how to override this. Basically my questions boil down to, how much of

WPF - How to set Grid's children in a style?

拟墨画扇 提交于 2019-12-25 03:37:29
问题 How can I do something like this? <Style TargetType="Grid"> <Setter Property="Children"> <Setter.Value> ... </Setter.Value> </Setter> </Style> I know Children in read-only and this gives me "Writable property expected" on Children. Thanks 回答1: You can't because Panel.Children is not a DependencyProperty . You almost certainly want to use an ItemsControl with a customized ItemsPanel . However, without more information I couldn't really say for sure. 回答2: You can use the ContentControl instead