styling

WPF Submenu styling

£可爱£侵袭症+ 提交于 2020-02-17 18:00:31
问题 I have a ContextMenu style and a MenuItem style, both of which are working properly on the top menu. The problem is if I add a submenu to a menu item, then the submenu is not being styled properly. It looks like you can only style the menuitem at this point, and not the actual sub menu so you can't replace the IsMouseOver styling (it just defaults to whatever theme is enabled on windows). I've searched and searched, the closest thing I can find is this forum post on MSDN http://social.msdn

WPF Submenu styling

与世无争的帅哥 提交于 2020-02-17 18:00:23
问题 I have a ContextMenu style and a MenuItem style, both of which are working properly on the top menu. The problem is if I add a submenu to a menu item, then the submenu is not being styled properly. It looks like you can only style the menuitem at this point, and not the actual sub menu so you can't replace the IsMouseOver styling (it just defaults to whatever theme is enabled on windows). I've searched and searched, the closest thing I can find is this forum post on MSDN http://social.msdn

Programmatically styling Android's CheckBox

有些话、适合烂在心里 提交于 2020-02-03 05:41:17
问题 I got a class which extends Activity and programmatically adding some View items. CheckBox checkBox = new CheckBox(this, null, android.R.style.Widget_CompoundButton_Star); I'd like to set some checkBoxes styled as the Android SDK stars. I can't see any check box after I set its style to that Widget_CompoundButton_Star. Although that SDK style apparently works when directly placing in a xml. Am I missing something here? THX // As Pragnani said. Using android.R.attr.starStyle instead works. 回答1

ListView styling in JavaFX

烂漫一生 提交于 2020-02-02 03:14:06
问题 I have a listview. I want to change the color of the background and the text fill. I have tried doing the following: playlistView.setStyle("-fx-background-color: blue; -fx-text-fill: black;"); But, this doesn't work. However, the following is working: playlistView.setStyle("-fx-font-size: 24px; -fx-font-family: 'SketchFlow Print';"); Can you please tell me how to get the background and text-fill to work? Thank you. 回答1: You can use the following CSS styles: .list-view .list-cell:even { -fx

Styling the Facebook login button next to other login links

孤街醉人 提交于 2020-01-17 02:26:25
问题 I am trying to add the Facebook login button to my header, but for some reason it appears way left and to the bottom of other links :) I am testing this out on this test page: http://www.comehike.com/test_fb_connect.php I was trying to get the button to appear just left of the login link on top right of the page. How can I accomplish this? Thanks! 回答1: Why dont you put it all in the same div? <div class="site_login"> <div class="facebook" > <fb:login-button show-faces="false" perms="user

Style the MouseOver on a Silverlight/WPF button

人走茶凉 提交于 2020-01-12 13:02:16
问题 Struggling with styling the mouse over for a button ... I have managed to style the button (solid red), but I would like for it to change to solid black whenever a mouse over occurs. I am new to XAML, and I can see that it wants some type of story board/animation ... not sure exactly how to do this. Any help would be greatly appreciated. 回答1: This is different from WPF to Silverlight. In WPF, the answer from Rob is correct. In Silverlight, this won't work. Silverlight uses the

Style the MouseOver on a Silverlight/WPF button

那年仲夏 提交于 2020-01-12 13:01:59
问题 Struggling with styling the mouse over for a button ... I have managed to style the button (solid red), but I would like for it to change to solid black whenever a mouse over occurs. I am new to XAML, and I can see that it wants some type of story board/animation ... not sure exactly how to do this. Any help would be greatly appreciated. 回答1: This is different from WPF to Silverlight. In WPF, the answer from Rob is correct. In Silverlight, this won't work. Silverlight uses the

WPF SystemColors: color of TextBox border

纵然是瞬间 提交于 2020-01-10 01:58:37
问题 I am trying to make a search TextBox with an embedded magnifying glass icon. I have the following markup so far: <Border DockPanel.Dock="Bottom" Margin="2,4,0,4" BorderThickness="1" SnapsToDevicePixels="True" BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"> <DockPanel> <StackPanel Orientation="Horizontal" DockPanel.Dock="Right"> <Image Source="/Resources/search-13x13.png" Width="13"/> </StackPanel> <TextBox Name="searchTextBox" DockPanel.Dock="Bottom"

How to style editable circle controls in Google Maps

狂风中的少年 提交于 2020-01-09 08:01:29
问题 Does anyone know of an easy way to style the user controls (white dots on the bouns of the radius) for the editable circles in Google Maps? I cant find any way of doing this in the API documentation. At the very least it would be great to have the dots on a lower zindex than my pin but modify the zindex options of both has no results. 回答1: I'm afraid you can't. The API provides no control over those handles, and since the circles live inside a canvas, there's no easy way to identify the

JavaScript get Styles

谁都会走 提交于 2020-01-09 02:30:19
问题 Is it possible to get ALL of the styles for an object using JavaScript? Something like: main.css ------- #myLayer { position: absolute; width: 200px; height: 100px; color: #0000ff; } main.js ------- var ob = document.getElementById("myLayer"); var pos = ob.(getPosition); // Pos should equal "absolute" but // ob.style.position would equal null // any way to get absolute? 回答1: You are talking about what is known as Computed Style , check out these article on how to get it: Get Styles on