styles

Silverlight toolkit themes override styles?

I have a Silverlight app that has a bunch of styles that are referenced everywhere in various controls...etc. If I apply one of the default silverlight.toolkit.themes to the app will these styles be overridden by the them (assuming the theme affects whatever the styles are applied to)? Thanks!! ...

Silverlight 4: XamlParseException when trying to bind with styles and resources

Hi Everyone I am using Silverlight 4 and I am trying to integrate one of the themes from the Silverlight 4 toolkit from April. My App.xaml reads as follows: <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Themes/System.Windows.Controls.Theming.Exp...

Silverlight XAML - set child item properties

I've got a Grid in my XAML page. The grid is simply a holder for XAML loaded from the database: <Grid x:Name="dynamicXamlHolder" /> I want all <TextBlock> objects that get inserted into that grid to have .TextWrapping = Wrap. How can I do this? I'm sensing styles might be the answer, but it's unclear to me how to create a grid style...

Is the downside of coding styles (css) in jQuery genuinely prohibitive?

I was just reading an article about the non-compatibility of some CSS, when it occurred to me that maybe I should be writing all of my CSS in jQuery. Aside from javascript-disabled browsers, which any ajax website isn't going to support anyway, what's the downside? The benefit, aside from greater browser support, would be the use of var...

Can a Silverlight application use containing HTML styles?

I'm developing a Silverlight 4 app that has to live within an existing ASP/HTML based site, which has its own css stylesheet. I want the Silverlight app to share the look and feel of its container application, so I'm wondering about the best way to accomplish this. About the only way I can think of would be to translate the css styles ...

Android creating themes and styles

I would like to define a theme for my first Android app. I use Eclipse and I follow this tutorial but have problems. Steps: A. I create the values/styles.xml file with content <?xml version="1.0" encoding="utf-8"?> <resources> <style name="default_splashScreen"> <item name="android:background">@drawable/bg</item> </style> </r...

Can one specify the fontType in android styles xml?

I am following an example project "Sky" by Jeff Sharkey using styles in my layout. It is working out quite well, however, I cannot determine how to specify the font type-face using the styles. Without this, I will have to apply the font explicitly to every TextView, EditView, etc., whereas I want to control where and when it is applied...

Adding stylesheet to XML breaks formatting

I wanted to add a stylesheet to my xml file. But when I add the xml-stylesheet the whole formatting disappears, and I'm getting pure string of data. How to do it right ? <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/css" href="sitemap.css"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt; {% spaceles...

WPF repeatbutton in scrollbar only triggers IsPressed from the template, not the style

I have a minor issue. We'd like to put as much stylistic items in the styles and outside of the control templates, to make themeing easier. So for the scrollbar's repeatbutton, I can get all of this to work but IsPressed. That only works from the template. So the template is (basically): <ControlTemplate x:Key="ScrollBarButtonCT" ...

Measuring controls created at runtime in WPF

Hi, I recognise this is a popular question but I couldn't find anything that answered it exactly, but I apologise if I've missed something in my searches. I'm trying to create and then measure a control at runtime using the following code (the measurements will then be used to marquee-style scroll the controls - each control is a differ...

ListBox Disabled state in Silverlight 4

So I'm styling a ListBox and I've got to the part where I need to do a greyed out style when the ListBox is disabled. However when I look a the states tab in Blend, there's only Validation States present - no sign of the usual Common States which include the Disabled state. I tried creating a vanilla project with no custom styles and ju...

How to distinguish Mouse.Clicks from different part of a control

If I have a Control with template like this: <Style x:Key="HomeButtonStyle" TargetType="{x:Type Control}" > <Setter Property="Template"> <Setter.Value> <ControlTemplate> <StackPanel VerticalAlignment="Top"> <Rectangle Width="20" Height="50" x:Name="PART_Rectangle" /> ...

WPF - Setting different ToggleButton image for each TreeViewItem root node with styles

I am new to using styles, resources and templates in WPF. What I need to do is override the ToggleButton +/- in the TreeView to be an image, with a different image for each TreeViewItem root Node. For Instance, I would want an image of a car for the "Car" node, and an image of an airplane for the "Plane" node. I have a colorful and a ...

XAML styles in Silverlight not being recognized

I am attempting to create a Syles.xaml file for my test Silverlight app. Here is what I have in the App.xaml file: <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:navigation="clr-namespace:System.Windows.Controls;assem...

Windows 7 style ComboBox in WPF

Hi, I'm trying to recreate the style of ComboBox in WPF that you see in windows explorer. I'm trying to create something similar to the 'Arrange by:' combobox, which is under Libraries->Documents for example. The combobox has no outline until you hover over it, and when clicked, displays a context menu which allows a single selection. ...

How to change templatized controls using styles

Hi, I'm using a ControlTemplate for defining the appearance of my buttons in a WPF application. Additionally I would like to use styles to set certain aspects of my buttons. These styles should set properties on elements defined in the ControlTemplate, like (simplified): <Window.Resources> <ControlTemplate x:Key="Template1" TargetTy...

How to set tooltip for user control (from style file)

Hi I created my control which looks like that <UserControl BorderBrush="#A9C2DE" HorizontalAlignment="Left" x:Class="WPFDiagramDesignerControl.Components.UcWBSBlock" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="86" Width="151" > <UserControl.Resourc...

Where can i find the default WPF Control templates?

As per this MSDN link, There is no way to replace only part of the visual tree of a control; to change the visual tree of a control you must set the Template property of the control to its new and complete ControlTemplate . I am trying to disable the click behaviour of GridViewColumnHeader ( I need to remove some trigge...

WPF - Setting Custom tooltip using style triggers

I am trying to display tool tip to a stack panel based on property HasValidationError. <Style TargetType="StackPanel" x:Key="stackstyle"> <Style.Triggers> <DataTrigger Binding="{Binding HasValidationError}" Value="True"> <Setter Property="ToolTip"> <Setter.V...

XamlParseException occurred: Failed to create a 'System.Windows.Style' from the text 'PhoneMasterGridColumnHeader'.

I have four datagrids on a Silverlight 4 page. I'm trying to set different column header styles for each grid. I found this XAML which works when I embed it in each DataGrid inside <sdk:DataGrid.ColumnHeaderStyle> tags: <Style TargetType="primitives:DataGridColumnHeader" > <Setter Property="Template"> <Setter.Value> ...