style

WPF Styles Question

A simple question which I can't find the answer on the web for some reason... I want to place the content to a ResourceDictionary: <TextBlock Style="{StaticResource HomePageTextStyle}"> <LineBreak/> Hello<LineBreak/> <Bold>World!</Bold> <LineBreak/> </TextBlock> The best I could do was: <s:String x:Key="HomePage...

Keep link as active when I move arround page, till I select another link.

Hi all, I have a problem with the links, I have created a menu made by links, which at the same time, indicates the user in what section he is. The menu works fine, but when I start doing things on the section under that link ( which it is pseudo-class active, as its been selected) then the link selected change to a normal link, therefor...

WPF styles: difference between x:Name and x:Type

While defining style in resource dictionary you can use either x:Name="xyz" and x:Type="xyz". and can reference this style in XAML like {StaticResource xyz}. Most examples use 'x:Key', and the difference between 'name' and 'key' is that using 'x:name' lets you use this style definition code-behind? FIXES: The question is to...

Trying to use a ResourceDictionary, but styles in it come up as not found

I have a Silverlight class library, called MyClassLibrary. In it, I have a user control, called MyControl. Within the control I define user resources: <UserControl.Resources> <Style x:Key="ComboBoxStyle" TargetType="ComboBox"> (lots of xaml) </Style> </UserControl.Resources> The control consumes the style like this: ...

How do I add style to content in JavaScript?

Hi I have been working in a JavaScript file and my content has been working with phrases. Now I want to change the style of those phrases. The first function (see function swapFE) I want to change the font style of the phrase node to normal. And change the color of the phrase node to the color value (155, 102, 102). The second function (...

How do I write a RGB color value in JavaScript?

I am trying to change the color of the function swapFE() below and I can't figure out how to write it. I was told to change the color of the phrase node to the color value (155, 102, 102). I tried to do that as you can see at the end of the function see- parent.childNodes[1].style.color= (155, 102, 102); but it just comes out a dark navy...

PyGTK: How do I make a custom widget look like a gtk.Notebook tab?

Hi, I'm writing a program and I need some extra functionality from the gtk.Notebook widget, so I have taken to creating my own. My only problem is styling my tabs so that they look like the tabs in gtk.Notebook and will change according to the user's theme. I really don't know where to start so any advice would be much appreciated, th...

How to make WPF DataGrid Column Header transparent

Hi, I am trying to make the column header of my WPF Datagrid to be transparent. I am able to set it to a color without problem, but I can't have it transparent. Here is what I tried: <Style x:Key="DatagridColumnHeaderStyle" TargetType="{x:Type tk:DataGridColumnHeader}"> <Setter Property="Background" Value="Transparent" /> <Sette...

python style question around reading small files

What is the most pythonic way to read in a named file, strip lines that are either empty, contain only spaces, or have # as a first character, and then process remaining lines? Assume it all fits easily in memory. Note: it's not tough to do this -- what I'm asking is for the most pythonic way. I've been writing a lot of Ruby and Java ...

How to reference WPF style keys defined in a separate assembly in another library

I have two libraries and a single application assembly project layout and I'm wondering how can I reference styles by their key in one of my libraries that's defined in the other. My solution layout: WpfControls.dll - Holds generic reusable controls such as a WPF based NumericUpDown control as well as other basic controls and some st...

Css attribute selector for input type="button" not working on IE7

Hi all, I am working on a big form and it contains a lot of buttons all over the form, therefore I am trying to get working input[type="button"] in my main css file so it would catch all buttons with out having to add a class to every single one, for some reason this is not working on IE7, after checking on the web it says that IE7 shoul...

What is the most effective way to style a Flex application?

This may be more of an opinion poll than a question, but here goes. I have a fairly complex Flex application that uses many different components. I want the application to be able to custom styling and/or skinning. I also want to be sure that the styling approach makes the most efficient use of system resources (memory, CPU, network),...

How to style the selected item of a ListBox to look like a selected item of a ListView (with GridView)?

I'd like to have the selected item of a ListBox on the right to look like the selected item of a ListView (with GridView) on the left. This is the XAML code: <Grid> <StackPanel Orientation="Horizontal" > <ListView Margin="4" Width="200" > <ListView.View> <GridView> <Grid...

Style expander buttons of TreeView

Here is my XAML: <Style x:Key="ExpanderStyle" TargetType="{x:Type ToggleButton}"> <Setter Property="IsEnabled" Value="True" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Image Source="/Images/SHCalendarLeftArrow.tiff" /> ...

WPF Setting the default style on a TextBlock overrides the style for a Label

Setting the default style on a TextBlock causes the style in the Label and other controls to be set as well. This only happens if you put the styles in the Application resources, when I place the style in the Window resources everything is fine. I have also found that the VS 2008 Designer and XamlPadX display the Label as you would expe...

Change Telerik Theme

How can I change the default telerik theme for a RadTreeView. I have multiple elements and the RadTreeView doesn't follow the color style of the rest of the elements. Say I want to change it to Vista. ...

Set style using JavaScript

For some reason I'm unable to set the "top" and "left" CSS attributes using the following JavaScript. var div = document.createElement('div'); div.style.position = 'absolute'; div.style.top = 200; div.style.left = 200; document.body.appendChild(div); Using Firebug I can see that the div gets the position set to "absolute" but the top ...

Java getter/setter style question

I have a question about Java style. I've been programming Java for years, but primarily for my own purposes, where I didn't have to worry much about style, but I've just not got a job where I have to use it professionally. I'm asking because I'm about to have people really go over my code for the first time and I want to look like I kn...

How do I replace the default style of a WPF control?

So that when I apply additional typed styles in my application I don't have to do the BasedOn thing in order for them to be merged with my custom global style. You know, like happens with Microsoft's own styles. Essentially, I want to apply my style at number 9 instead of 8. If that's relevant: I also want to completely ignore themes an...

Styling both Hyperlink and TextBlock with a single style?

I have two types of text that need to follow similar coloring rules based on an enumeration: public enum Modes { A, B, C } A Style with DataTrigger markup is used to colorize: <Style TargetType="SEE BELOW" x:Key="Coloring"> <Style.Triggers> <DataTrigger Binding="{Binding Path=.}" Value="...