styles

css - hidden div has large white space in its place in IE

Hi, Any ideas how I get rid of white space on my IE browser. It is caused by a hidden div. When I remove the div the white space goes. Works fine in FF. Here is the DIV: <div class="hidden" id="popup"> <div> <H1 class="center" id="popupTitle"></H2><br/><br/><br/> <div style="position:relative; display:inline;"> <p id="popu...

WPF Databinding and Styles with MVVM

I have a problem with databinding on a style in WPF. The basic setup looks like this: <Style x:Key="{x:Type eo:Player}" TargetType="{x:Type eo:Player}"> <Style.Triggers> <DataTrigger Binding="{Binding Team}" Value="A"> <Setter Property="Template" Value="{StaticResource TeamATemplate}"></Setter> </DataTrigger> ...

What do I use for `BasedOn` when creating a custom style for a DataGridColumnHeader in WPF?

What should I put for BasedOn in this style? <Style x:Key="DataGrid_ColumnHeaderStyle" TargetType="wt:DataGridColumnHeader" BasedOn="??????????"> <!-- I want this to be a reference to the default style --> <Setter Property="BorderBrush" Value="{StaticResource Media_RaisedBorderBrush}" /> <Setter ...

Flex style name conflict

Hi, I am building custom as3 flex component with Flex3. My component has a style: [Style(name="rollOverColor", type="uint", format="Color", inherit="no")] Everything works fine until I include both my component and a LinkButton into MXML application. Flex builder tells that there is an error in the application when I try to compile it...

Style not being applied to Datagrid Header in WPF ... Resource Issue

Hi, I'm trying to Use a Header Style for my WPF DataGrid that sits in a UserControl. but i get this: Cannot find resource named '{DataGridRowHeaderBackgroundStyle}'. Resource names are case sensitive. Error at object 'Microsoft.Windows.Controls.DataGridTextColumn' in markup file 'WPF;component/view/dashboardview.xaml' Line 17 Position ...

Is there a way to attach an event in a XAML style?

I want every clickable TreeViewItem to execute TreeViewItem_MouseLeftButtonDown, is there a way to put this in the style so I don't have to define it everywhere. I could run through all children in code behind but I would think there would be an easier way to do it in a style. The following code gives me: Cannot find the Style Prope...

Need help with a custom Style in WPF

I'm attempting to build some simple custom styles for the WPF Toolkit DataGrid control. I have a style for the overall DataGrid and a style for the DataGridColumnHeader. I am not setting any control templates, only basic properties. Here is what my sample DataGrid looks like with my custom styling applied: The header has the gradien...

Dependency property not working, trying to set through style setter.

I am trying to set up a custom style for my newly made usercontrol, however i am getting the error : "Cannot convert the value in attribute 'Property' to object of type 'System.Windows.DependencyProperty'." I thought i had set up Dependency properties but it seemed this was not the case, so i did some research and added: public stat...

silverlight 3 style composition

I haven't been able to find a simple, straightforward answer regarding this scenario, so I thought I'd try here. In WPF, you can so something like this: <Style x:Key="headerBlock" TargetType="{x:Type StackPanel}"> The idea here is to avoid setting the Style property on every TextBlock inside the Stack...

Need themes for the WPF Toolkit controls (espeically DataGrid)

I just downloaded the nice themes collection from the Codeplex WPF Themes site. I like the WhisterBlue and BureauBlue themes a lot, but neither contain any styles for the new controls included in the WPF Toolkit (DataGrid, DatePicker, and Calendar). It seems like someone out there must have extended the themes to cover these controls, b...

Default Image Style

It was my understanding that this: <Style TargetType="{x:Type Image}"> <Setter Property="Margin" Value="0"/> <Setter Property="Stretch" Value="None"/> <Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="Cursor" Value="Help"/> </Style> would change...

Design-Time Resourcedictionaries

I have created something like this and this. In effect I have a dll which supplies me with a "styler" for my application - it contains all my basic styles as well as a factory to call StylerFactory.DefaultStyler.ApplyStyles(this) on an Application - which merges the supplied ResourceDictionaries with the existing. This way I don't need a...

Where to find Generic.xaml for native WPF controls?

Where to find Generic.xaml (or other code with the default look) for native WPF controls such as Button, CheckBox, TextBox, etc? ...

DataTemplates in resource dictionaries don't inherit from app.xaml styles??

I added custom named styles to the app.xaml. I created an external resource dictionary (which I attach in the merged dictionaries of the app.xaml) and when I try to use one of the above named styles in the rcource dictionary, it says that there is no such style. Also the default styles (i.e. unnamed styles that apply for the entire app...

ASP.Net Theme not applying to one page.

I have an ASP.Net site and one page will not load the ASP.Net themes even though it works for everything else. It's in the same directory as other pages that work. It uses the same master page as working pages. But for some reason it's not emitting the <link> element for the style. Paging is not disabled on the page, and it is enabled a...

Eclipse doesn’t recognize style in the Android Layout builder?

Since Android supports styles and it's good practice to use them (similar to CSS), I made a new style and applied it to 3 buttons. The Layout builder in Eclipse did not register the changes and either broke (showed nothing) or didn't apply styles at all. After running the app in the emulator, styles are correctly applied. So is there ...

WPF Style Hierarchy?

I may have missed something obvious with WPF, but is it possible to create styles that work hierarchically with the targeted control's child controls? To better explain, think of how CSS works to style HTML. You can hierarchically target controls with CSS via selectors: div > span em { color: blue; } ul.class > li ul li { displa...

WPF ListView : Header styling

I want to have a ListView with columns and a particular style: The background for ALL column headers should be transparent except when the mouse is over in one of them. When this happends, the column's background in which the mouse is over should be yellow and all the color in the other columns should be, let's say, blue. I've tried ...

FrameworkElementFactory "ignores" parent resources (e.g. styles)

Hello, I am trying to create some custom treeviews. Everything is working fine so far, but I got a little problem with styles. I have a simple "RedBackground" Style which I add to the resources of the Window. When adding normal elements, it works fine. When using a custom item template to render treeview items, my resource is ignored....

Is it something bad to use <BR />?

Hi, Is it something bad to use <BR/> tags? Why I ask this is, in our development team it was one of the first advices to me not use <BR/> but to use styles. But why? Are there some negative outcomes to use <BR/> tags? Thanks. ...