style

WPF 4 ContentPresenter TextWrapping style is not applied to implicitedly generated TextBlock

If I assign a piece of text to the Content property of a ContentPresenter a TextBlock control is generated by the ContentPresenter at render time to contain that text. If I create a style that applies to TextBlock properties and assign it to that ContentPresenter, the does not appear to apply to the implicitly generated TextBlocks. <St...

How do I make a CheckBox look like a RadioButton

I wanna use a CheckBox but I want it to have the RadioButton chrome. What's the easiest way to do this? ...

Is there a style library for text formation in WPF application?

I'm thinking of the set of styles to format text (Office 2010 style, Office 2003 style, v.v.. ); each set contains of smaller styles (header 1, header 2, title, ...) Is there a similar "thing" to use for WPF/Silverlight application? ...

ListBoxItem dynamic style in Silverlight

Is it possible to change ListBoxItem style up to its DataContext property "IsFail" (true, false). ListBoxItem style is defined via VisualStateManager States in ItemContainerStyle. <ListBox x:Name="ShortInfoListBox" Background="{x:Null}" ItemTemplate="{StaticResource ShortInfoTemplate}" ItemCont...

Problems changing the style of certain items in a ListView

I have a ListView of TextViews and to highlight one of these, I want to make the TextView bold. This only works if I don't scroll the ListView. After I scroll, the boldness changes to a different position. Does anyone know why, or how I can solve this problem? ...

WPF Checkbox style making focus border behave strangly

Hi All, I am using WPF with a style sheet. In my style I have been trying to customized the look of the dotted focus border for a checkbox. I need the focus border to only draw around the square an not the entire control. I set my style width to 15 and the dotted border is correct, but does not surround the square, its off to the side....

Is there a way to quickly create a style from a set of selected attributes?

I currently want to create a wpf style by selecting a group of attributes, e.g. Height, Width of a button, then right click and call a command like "Generate style from selection" and the IDE will do the rest for me: add .Resource tags, and a Style with sample x:Key and put the attributes' names and values into Setter tags. Is it possib...

php class to inline css styles?

Hi, I was over at MailChimp's css inliner http://www.mailchimp.com/labs/inlinecss.php and I was wondering if there are any classes out there that can do this, I'd love to have it in my email code instead of going all the way over to MailChimp. Basically I'm looking for the code, behind the page or something very similar. Cheers. ...

Is the new Ruby hash syntax not "stylish" within the Rails community?

I am new to the Rails community, and I also like to try and follow the conventions that the community uses. In the Rails 3 books I have been reading I have noticed that the authors have been opting for the old :key => value syntax versus the new Ruby 1.9 style key: value. Do Rails developers generally adhere to one style and not use the ...

Branding SharePoint Search Result

Hi all, In my SharePoint site I have a list wich has a column that contains rich text in it. (i.e text with bold, color and italic style). Now when user perform search, If the search key word match with the data in rich text column it will show that record as a search result which is perfect. But the result in search result page show...

IsDropDown on IsMouseOver of ComboBox is killed by ONE mouseclick on WPF ComboBox WHEN it opens

This is the Style set to my ComboBox. When I hover the ComboBox, the popup opens/slides and then right at the moment where it opens I click on it which is closing the combobox because I have choosed an item. The next time I hover the combobox is does not open anymore... Why? <Style x:Key="GroupViewModelStyle"> <Style.Trigg...

best practice for providing multiple android application themes

i'm trying to work out how to organize an android application that will have multiple themes. here's a simplified example of my problem, 2 themes, "light" and "dark", within each theme, two text colors: "enabled" and "disabled" now the problem is that when i define my TextView, i don't want to call out "light" or "dark" there, i want t...

WPF DataGrid columns alternating coloring

How can I make columns coloring in DataGrid if I also want use AlternatingRowBackground property? I have some ideas, but it doesn't work :(. <de:DataGrid Name="dataGrid1" AlternationCount="2" AlternatingRowBackground="Salmon" > <de...

How to change text style based on state with xml?

StateListDrawables and <selector> are great for setting different drawables for each state of a view, but is there a way to tie in what text style that view should use for each of those states? For example, if you had a button that was white with black text, and when clicked, the button color became black, you would want your text color...

Style for nested gridview asp.net

Hi I have am using nested GridView to show Customers in the mainGrid View and CustomerDetails in the Inner GridView. for the outer GridView there is a CellPadding set of 4px. Now when i use nested gridview, I do not want the Pading to be apllied for the cell containing the InnerGridView. Please help me with this. I am stuck on this issue...

Reference to another Brush from one Brush in xaml

Is it possible to directly reference to a Brush value from another Brush in my resource dictionary, without using a Color definition (or to be exact, copy one brush resource into another)? For example, I have a Brush definition: <SolidColorBrush x:Key="PanelBackgroundBrush" Color="White"/> And I have a couple of other brushes I'd lik...

How to override jQuery UI Widget Styles and Keep the Functionality

I am using jQuery UI for an in-house application. I am looking for an easy way to remove all style information provided by jQuery UI on a given widget instance. I'm open to really anything, but a reusable javascript solution would be perfect. It's absolutely imperative that no functionality is lost. the most important thing is that...

Check if opacity is set

Hi there. I have a script that animates opacity but if the opacity has not been previously set then it just disappears. I just wondered if there was a way to check if the opacity has been set. Thanks in advance! ...

Get cell style from excel spreadsheet with C#

Im trying to copy some cells from one workbook-sheet to another workbook-sheet and preserve the style and formatting using C#. I can get the attributes one by one like this: string fontName = ((Excel.Range) workSheet.Cells[3, 2]).Font.Name.ToString(); But Im looking for at way to get it all at once. Thanks ...

silverlight barseries colors

I can't seem to figure out how to bind the color of the datapoints in my BarSeries. I see tons of posts about this using control templates and BarDataPoint. I can't seem to figure how to attach the template. <charting:Chart Name="chtIndPerformance" Canvas.Left="464" Canvas.Top="275" Height="363" Width="444" FontSize="10" BorderBrush=...