styling

How to place a ScrollViewer on top of the content it should scroll

I would like to put my ScrollViewer in such a way that it overlaps/sits on top of the content it scrolls. I would set the Opacity of the ScrollViewer so that the content is visible underneath. As far as I understand the default ScrollViewer, this doesn't seem to be possible out of the box since the content is nested inside the ScrollVie...

How to restyle a control nested in a custom control?

Suppose that you are developing a custom control in WPF that contains internally some other basic controls. To keep it simple suppose that it contains 2 buttons. Now you want to use this custom control in your app, but you want to restyle it a bit. CASE 1 If, in the custom control definition, both buttons have the same style (wpf defa...

Inheritance in Silverlight 2 Styles

I want to build up styles in XAML, e.g. <UserControl.Resources> <Style x:Key="MyStyle" TargetType="TextBlock"> <Setter Property="Margin" Value="2,2,2,2" /> <Setter Property="Foreground" Value="DarkRed" /> </Style> <Style x:Key="MyBoldStyle" TargetType="TextBlock"> <Setter Property="Style" Value="{Stat...

Form Styling with SPAN text instead of input or select controls

I've got CSS that formats labels above form input elements and I'd like to replace the input elements with text from the database if I'm just displaying read-only data. No matter what I do, changing the input fields to a span or asp:label will not properly render the label above the text. I'm using this CSS: div.formRow { padding: ...

How do I control the styling of an html unordered list?

Who thought that styling a list of links could be so troublesome! First issue I would like to use an arbitrary char as the bullet. I am sure now that this is impossible but maybe you know different? In any case I would like to control the distance between the bullet and the contents of the <li>. I would like to control the height of th...

How do I set the office 2007 style with Infragistics?

I have been looking to set the office 2007 form style using infragistics, but just cant find the code lines i need (which I suspect are very few!) Does anyone have the code I need or a link to a tutorial? Looking on the infragistics site the samples seem few (or I just cant find them). ...

What are your strategies for putting XAML into styles?

When I create WPF applications, very quickly my XAML starts to bloat. I then approach the XAML/style issue in a HTML/CSS way, looking for repetitive code and packing it into styles which I put into my Window.Resources section. Is this the way others are doing it or is there some better way now in XAML? It just seems that the two blocks...

How can i get List items to stay together using CSS?

The skeleton of the HTML is this <div class="TwoCol"> <img src="imgurl"/> <h1>A headline</h1> <p>Some exciting text</p> <ul> <li>Item A</li> <li>Item B</li> <li>Item C</li> </ul> <p>More riveting text </p> </div> The CSS is .TwoCol img{ float:left; padding-right:5px; border:none; } .TwoCol ul{ list-style-type:none; } T...

Div Width Problem

What keeps a div from extending horizontally past the edge of the screen when there are horizontal scroll bars? The DIV's content will overflow out to the left but not the DIV itself. What can make the div go all the way to the right? Thanks ...

Drupal/Ubercart ... node styling?

I am trying to style the product view on a Drupal site, but am having problems. I can't find where the node (product) view is put together in ubercart! I'm using UC 5.x-1.7, and I need to style the node (product) view page. At the moment in my node.tpl.php file, I have print $body; which spits out all the SKU, attributes, price, pictur...

WPF SystemColors: color of TextBox border

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> <Sta...

Can I style a Google Map?

How much control do I have regarding the styling of a google map? Can I make it more closely resemble a site's colour scheme or are we stuck with pastels? ...

WPF styling tabitem text foreground upon trigger such as IsEnabled, IsMouseOver, etc.

I'm trying to change the foreground text colour of a WPF tab item's header textblock using triggers. This works fine for most (simpler) scenarios but not when TextBlocks have been globally styled. So this simple "mouse over" trigger would work in terms of changing the foreground color: <Style x:Key="testTabItemStyle1" TargetType="{x:Ty...

CSS: Cancelling properties at the start and end of a list

I have a menu list. I'm not using UL/LI, just nested DIV's. There are graphic separators between the menu items. The first item in the list needs to suppress the left padding; the last item needs to suppress the right padding and the graphic separator. Here's the CSS: .platformItem { float: left; padding: 0 12px; background: u...

Creating default style for custom control

Hey Im currently creating a custom control (based on the WPF DataGrid). What i would like to do is to set default styling on the datagrid. Currently im setting the Style property which works. But my problem arrises when i create a style to change fx. the background color in the main applications app.xaml. Then all my "default" styling i...

CSS Parent/Ancestor Selector

I know this is a shot in the dark, but is there a way, using css only, CSS2, no jquery, no javascript, to select and style an element's ancestor? I've gone through the selectors but am posting this in case I missed something or there is a clever workaround. For example, say I have a table with classname "test" nested inside a div. Is t...

CakePHP form helper - HABTM multiple checkbox styling

I have two tables restaurants n cuisines which are related to each other as HATBM table cusinies have certain fixed entries - 54 number i restarurant can hve any number of cuisines. on baking the application this came with a multiple select. since i wanted check boxes i used array( 'type' => 'select', 'multiple' => 'checkbox') to conve...

Styling different levels of a WPF treeview differently?

I have a very flat-structured treeview with only two levels of items - the main ones, and one level of subitems. I am using WPF MVVM and would like a way to style the two levels differently, but have no idea how. I bind the treeview to an ObservableCollection in my ViewModel, and each element has one more ObservableCollection for the ne...

Tricky WPF styling issue - can you do it?

Hey guys I have an observable collection of items, where each item has a name and a "group name" (both strings). The tricky part is, in XAML, I need to style this collection such that all items with the same group name are listed next to each other, and the group name is shown at the top. I have designed user controls for the layout o...

WPF, XAML: How to style a ListBoxItem using binding on property of ListBox ItemsSource object?

I have a ListBox which is bound to ObservableCollection of LogMessages. public ObservableCollection<LogMessage> LogMessages { get; set; } public LogMessageData() { this.LogMessages = new ObservableCollection<LogMessage>(); } Each Message has two parameters: public class LogMessage { public string Msg {...