style

How to create a gradient background which works with most/all browsers ?

Here is what I want to make, somehow: 1- A gradient background from top and down. There should be 2 colors, lets call them color1 and color2. 2- I want the gradient to be about one page, so it starts on top with color1, and then ends about one page down with color2. 3- Then I want color2 to continue all the way down for whatever size ...

C# Winforms Panel with same style (shadow) as TabControl?

I want a panel to have some sort of dropshadow like the TabControl has, is this possible? ...

Silverlight 3 Datagrid: Template rows container

Is it possible to template the container for datagrid rows so that they can wrap horizontally? eg in the ItemsControl you can simply change the ItemsPanel to use a WrapPanel. I can't use a ItemsControl because I want to use the Grouping support in the DataGrid when bound to a DomainDataSource. ...

Hadoop pig latin style guide?

Hi, I'm looking to take the short cut on formatting/style for pig latin (hadoop-ay). Does anyone know where I can find a style guide? -daniel ...

In a style, how can I refer to the element on which the style is applied ?

Hi, In a style, how can I refer to the element on which the style is applied ? For instance, in the style I define a RenderTransform, and I would like to add an animation on the RenderTransform : <Style x:Key="myStyle" TargetType="{x:Type FrameworkElement}"> <Setter Property="RenderTransform"> <Setter.Value> ...

Is fast enumeration considered bad form or is it generally accepted?

Just wondering, it seems like it works pretty well but I want to make sure I am using generally accepted coding practices and not get into bad habits. Thanks, Nick ...

XAML - MergedDictionaries throwing XmlParseException "item has already been added". Why?

hi all, I have the following, very easy to reproduce problem: I'm creating a xaml application which uses resources from another file. The way to go is to create a MergedDictionaries-tag to merge the local and global resources, like this: <Window> <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries...

Writing copyright information in python code

What is the standard way of writing "copyright information" in python code? Should it be inside docstring or in block comments? Sorry to bother if it is trivial, as I could not find it in PEPs. ...

Combo box styling to show rating and description WPF

Hi all, I'm not very good with styling in WPF, so I thought that I would ask here and see if anyone can help. I have a combo box which is bound to a view model that has a rating and description, when I hover my mouse over a item the item changes to show the rating and description for that item. This works ok however because some of th...

Clear wpf listbox selection using button in control template and no codebehind

I want to create a style for a WPF listbox that includes a button in the control template that the user can click on and it clears the listbox selection. I dont want to use codebehind so that this style can be applied to any listbox. I have tried using event triggers and storyboards and it has proved problematic as it only works first t...

Simple getComputedStyle in Prototype JS?

Is there an easy cross-browser way to get computed style of an element in PrototypeJS, without checking document.defaultView... and other properties? ...so that the code looked like var elt = $$('.xyz')[k], border = elt.getComputedStyle('border-bottom-width') PrototypeJs provides getDimensions, -Width, and -Height methods that ret...

WPF TabItem Style with image

I have a TabControl with TabItems, The Tab Items have text and an icon. To do this I have to add a StackPanel to the TabItem. However, once I add the StackPanel I can no longer control the default style of the text. Resource: <Style TargetType="{x:Type TabItem}"> <Setter Property="Template"> <Setter.Value> <Con...

MouseBinding overrides EventBindings in style

Hello I created a named style on an image, and in the style I set an EventBinding for the MouseDown event to a handler at the ResourceDictionary's code-behind, it worked good. When I use the image as the following: <Style TargetType="{x:Type Image}" x:Key="ImageStyle"> <EventSetter Event="MouseDown" Handler="Image_MouseDown"/> </S...

Add space between cells (td) using css.

I am trying to add a table with space between cell as the background colour of the cell is white and the background color of the table is blue, you can easily see that padding and margin are not working (I am applying it to the td), it will only add space inside of the cell. ...

Using cellspacing and border-collapse:collapse cuts cell borders.

Hi I just added cellspacing to get space between the cell, but this has cut out the border of the cell an the left hand side. This is happening because of the use of border-collapse:collapse for all tables, but I read on the net that this is to standardize for cross browser. If this is true. Should I keep border-collapse:collapse for...

rowspan do not work with thead and tbody.

Hi, I am trying to use rowspan in a table with thead and tbody ex. <table> <thead> <tr> <td rowspan="2">test</td> <td>Initials</td> </tr> </thead> <tbody> <tr> <td>&#160;</td> </tr> </tbody> But it does not allow me to do it. Is there a way arround? Or do I have to remove the thead and t...

Are there any other styles other than css?

<style type="text/css">..</style> From the above html,I think there should be,but I've never seen it,is there? ...

Can you mix % and px to align a table?

I am trying to align different tables with different amount of columns so the first two columns are align and the rest are independently align but using % it is very difficult and when resizing window it losses alignment. That is why I was trying to align mixing with % and px on td, ex. <table> <tr> <td width="100px"></td> <...

Window style and paint message

I created a window with WS_EX_LAYERED style, then i checked the first WM_PAINT message, I called BeginPaint to retrieve the area need to be paint, but the area i got is empty. But, when i create this window using WS_EX_LAYERED | WS_EX_COMPOSITED, i got the right area which need to be paint for the first WM_PAINT message. Why? Code fragme...

Changing the font color on a disabled checkbox in WPF

I'm hoping this is an easy answer, as I'm just learning WPF. I've got a resource dictionary that defines all our styles. Currently the checkbox style looks like: <Style x:Key="StandardCheckboxStyle" TargetType="{x:Type CheckBox}"> <Setter Property="Foreground" Value="{Binding Source={StaticResource BrandInfo}, XPath=//Colors/@TextC...