styles

WPF Separate Error and Warning Styles

筅森魡賤 提交于 2020-01-13 09:47:10
问题 How can we show user Warnings in a similar way to Errors. The only difference is that the control e.g. TextBox needs to have a different error template and similar to Validation.HasError there needs to be a Validation.HasWarning. In other words not all validation issues are "errors" (in our application at least). We want to visually indicate whether something is a warning or error. 回答1: I get the need for that middle ground sometimes. Like Command s that need 3 values from CanExecute rather

Extract text from PDF in respect to formatting (font size, type etc)

陌路散爱 提交于 2020-01-13 06:58:21
问题 Is possible to extract text from PDF file in respect to specific font/font size/font color etc.? I prefer perl, python or *nix command line utilities. My goal is to extract all headlines from PDF file so I will have nice index of articles contained in single PDF. 回答1: Text and /font/font size/position (no color, as I checked) you can get from Ghostscript's txtwrite device (try -dTextFormat=0 | 1 options), as well as from mudraw's (MuPDF) with -tt option. Then parse XML-like output with e.g.

WPF - How to create a style that applies styles to child types

这一生的挚爱 提交于 2020-01-12 14:53:49
问题 I'm trying to get a style to apply another style to elements of a certain type. Similar to CSS where you would do div a { background-color:red; } To apply a red background to all <a> elements that are contained by <div> elements. Specifically, I'm trying to get all TableCells contained within a TableRowGroup with a certain style to have their borders changed. I have the following solution where each cell style is set individually. <Table> <Table.Columns> <TableColumn/> <TableColumn/> </Table

Removing inline styles using php

☆樱花仙子☆ 提交于 2020-01-12 07:17:18
问题 I am using php to output some rich text. How can I strip out the inline styles completely? The text will be pasted straight out of MS Word, or OpenOffice, and into a which uses TinyMCE, a Rich-Text editor which allows you to add basic HTML formatting to the text. However I want to remove the inline styles on the tags (see below), but preserve the tags themselves. <p style="margin-bottom: 0cm;">A patrol of Zograth apes came round the corner, causing Rosette to pull Rufus into a small alcove,

custom style action bar not working in android 4

为君一笑 提交于 2020-01-11 09:22:17
问题 For customizing my action bar I use code below in xml: <style name="CustomActionbarTheme" parent="@style/Theme.AppCompat.Light"> <item name="actionBarTabStyle">@style/customTab</item> <item name="actionBarStyle">@style/MyActionBar</item> </style> <style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar"> <item name="background">@drawable/title_bar</item> </style> <style name="customTab" parent="@style/Widget.AppCompat.ActionBar.TabView"> <item name="android:background">@drawable

custom style action bar not working in android 4

◇◆丶佛笑我妖孽 提交于 2020-01-11 09:21:47
问题 For customizing my action bar I use code below in xml: <style name="CustomActionbarTheme" parent="@style/Theme.AppCompat.Light"> <item name="actionBarTabStyle">@style/customTab</item> <item name="actionBarStyle">@style/MyActionBar</item> </style> <style name="MyActionBar" parent="@style/Widget.AppCompat.ActionBar"> <item name="background">@drawable/title_bar</item> </style> <style name="customTab" parent="@style/Widget.AppCompat.ActionBar.TabView"> <item name="android:background">@drawable

Resize bitmap inside a drawable layer-list

99封情书 提交于 2020-01-11 05:30:35
问题 Currently I'm developing a Android application. I want to make a text (a header) with a background that looks like this: _______ /______/ I have the following code: <?xml version="1.0" encoding="UTF-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <shape> <gradient android:startColor="@color/jaarkleur" android:centerColor="@color/jaarkleur" android:endColor="#E66C2C00" android:angle="0" /> <stroke android:width="1dp" android:color="#ff000000" /> </shape> <

Remove action bar shadow programmatically

空扰寡人 提交于 2020-01-10 17:43:31
问题 How can i remove the drop shadow of action bar from java code ?. If i remove from the style it is working fine. <style name="MyTheme" parent="Theme.Sherlock"> .... <item name="windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item> .... </style> But i need to remove and add it dynamically from java code. 回答1: There is no way to set value for windowContentOverlay attribute programmatically. But you can define two different themes, one for Activities with a

text-decoration problem in Firefox, jQuery and jqgrid

让人想犯罪 __ 提交于 2020-01-10 06:05:35
问题 I have issue wuth Firefox not displaying style "text-decoration: line-through". I am using jqGrid for displaying list of medications. If medication is not active, it has to be crossed. In my afterInsertRow event I do this: $('#' + rowid).css({ 'text-decoration': 'line-through', 'color': 'red' }) It works fine for IE and Chrome, but Firefox displays only red text without crossing line. When I look into firebug output, I can see that <tr> element has style definition including text-decoration,

text-decoration problem in Firefox, jQuery and jqgrid

心不动则不痛 提交于 2020-01-10 06:03:30
问题 I have issue wuth Firefox not displaying style "text-decoration: line-through". I am using jqGrid for displaying list of medications. If medication is not active, it has to be crossed. In my afterInsertRow event I do this: $('#' + rowid).css({ 'text-decoration': 'line-through', 'color': 'red' }) It works fine for IE and Chrome, but Firefox displays only red text without crossing line. When I look into firebug output, I can see that <tr> element has style definition including text-decoration,