styling

How to create a menu in WPF that has Microsoft Web Application styling

不打扰是莪最后的温柔 提交于 2019-12-03 07:23:12
We have been tasked with designing an enterprise application in WPF that will replace a battleship grey Winforms application with a modern look and feel. We like the look and feel that Microsoft web applications currently possess: We could create these menus in WPF in the usual way: <DockPanel> <Menu DockPanel.Dock="Top"> <MenuItem Header="_File"> <MenuItem Header="_New" /> <MenuItem Header="_Open" /> <MenuItem Header="_Save" /> <Separator /> <MenuItem Header="_Exit" /> </MenuItem> </Menu> <TextBox AcceptsReturn="True" /> </DockPanel> But we'd get something that looks like a Winforms menu. I

VisualStateManager — showing mouseover state when control is focused

守給你的承諾、 提交于 2019-12-03 06:21:00
问题 I am creating a WPF button using Windows 8 styling (formerly metro). I would like the focused state of the button to show with a solid background. When the mouse is over the control, I would like th background to darken slightly to create the visual cue that the button can be clicked. Unfortunately, the XAML I've written below does not work. The focused state shows correctly, but when the mouse is over the control, the background does not darken as I would like it to. <Color x:Key=

Most efficient data structure to add styles to text

寵の児 提交于 2019-12-03 06:13:53
问题 I'm looking for the best data structure to add styles to a text (say in a text editor). The structure should allow the following operations: Quick lookup of all styles at absolute position X Quick insert of text at any position (styles after that position must be moved). Every position of the text must support an arbitrary number of styles (overlapping). I've considered lists/arrays which contain text ranges but they don't allow quick insert without recalculating the positions of all styles

Styling a TableView in CSS (JavaFX)

做~自己de王妃 提交于 2019-12-03 05:49:12
问题 How can I style the "THIS" point in my TableView? My CSS Code looks as follows: */* * Empty Stylesheet file. */ .root{ -fx-background-color: #262626; } .table-view{ -fx-background-color: transparent; } .table-view:focused{ -fx-background-color: transparent; } /* Spaltenköpfe Struktur column-header-background -> column-header */ .table-view .column-header-background{ -fx-background-color: linear-gradient(#131313 0%, #424141 100%); } .table-view .column-header-background .label{ -fx-background

How to remove this strange visual artifact in the corner of ToolStrip Winforms control?

只愿长相守 提交于 2019-12-03 05:43:33
Here is the picture that shows the problem. Take a look at the bottom right corner. Anyone knows how to get rid of it? Setting LayoutStyle to VerticalStackWithOverflow fixes it but also centers the items horizontally which I don't want. I just want a vertical stack like in the pic, but without that black line in the bottom right corner. In the properties bar, set "RenderMode" to "System" or use .RenderMode = System.Windows.Forms.ToolStripRenderMode.System; Doing this will change the .BackColor to "Control" but you can change that after if you want. Sorry for being late to the party, but the

Conditional Styling and Binding

橙三吉。 提交于 2019-12-03 04:41:35
In Angular 2 I am binding a dollar value like this inside a TABLE TD. <td> {{eachOutlet.dollarValue}} </td> This dollarValue will be less than 0 or equal to 0 or greater than 0. When it is less than zero it should show up in "Red" color. When it is zero, nothing should show up. Just blank text. When it is greater than zero, it should use thousands separator and show the number. How can I apply such conditional styling using Angular 2 binding? Is it even possible to do it ? <td> <span *ngIf="eachOutlet.dollarValue != 0" [style.color]="eachOutlet.dollarValue < 0 ? 'red' : null"> {{eachOutlet

Styling custom dialog fragment not working

风流意气都作罢 提交于 2019-12-03 03:44:34
I'm trying to style all my dialog fragments to look the same in my app. The dialogs coming from my settings fragment are styled exactly the way I want it. For my custom dialog fragments, the style is similar but not exactly the same. For some reason the spinner, timepicker, datepicker, radiobuttons, and edittext widgets inside my custom dialog fragments don't pick up the same style. In fact, the widgets blend in with the white background and you can't see that they are there. What am I doing wrong? <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"/> <style name="Theme.Base"

Master detail split styling in android

末鹿安然 提交于 2019-12-03 03:21:38
问题 This question probably has been asked many times over here, without yielding useful answers. I'd place it here with a possible answer. Feel free to improve. Question: How to setup popup like style of detail view, in side by side master detail view as highlighted in image below: 回答1: In this solution , I have used 9-patch background images, to define 2 kinds of backgrounds for list items. So, the selected(checked) list Item has a different background, as shown: (list item) (selected item)

WPF TextBox Border when selected?

老子叫甜甜 提交于 2019-12-03 03:00:16
I want to make a WPF TextBox have a DarkBlue border and thickness equal to 1. I want to make the WPF have this border ( DarkBlue, thickness set to 1 ) even when the TextBox is selected. I tried doing this task by the following code. However, it doesn't work at all. Any ideas or hints ? Any help would be greatly appreciated. <Style x:Key="ReadOnlyLargeTextBox" TargetType="{x:Type TextBox}" > <Setter Property="Height" Value="80"/> <Setter Property="MaxHeight" Value="80"/> <Setter Property="VerticalScrollBarVisibility" Value="Visible"/> <Style.Triggers> <Trigger Property="TextBox.IsMouseOver"

WPF - How to style the menu control to remove the left margin?

强颜欢笑 提交于 2019-12-03 00:49:35
I have added a default menu control to my user control. I need to style the menu to remove the left margin containing the space for the icon or checkbox. How can I do this? XAML: <Menu> <MenuItem Header="MyMenu" FontSize="10"> <MenuItem Header="Options..." /> <MenuItem Header="About" /> </MenuItem> </Menu> It currently renders like any other Menu control out of the box: I don't want the margin or column to the left of the menu items. This is typically used for icons etc. It's not very straight forward, but you need to create a MenuItemStyle, easiest through Expression Blend: <Menu> <MenuItem