style

How can I include PHP in a vBulletin style?

I'd like to use PHP in a vBulletin style/skin, yet when I do so, the PHP doesn't work. By 'not work', I mean it's treated just as plain text. And if you look in the code you can see the PHP code (hidden, by Firefox - which is the behaviour you get if you put PHP code on a plain html page) http://vapurl.com/h0kp3fqr8c - view source, and...

Code Length in IDE ( w/o modeling support ) versus Code Efficiecy in Compilation in Delphi

So - highly hypothetical question and more like discussion about your coding style and practice you use daily. I will take as example: CodeGear RAD Studio 2009 (sorry to all D7 fans, but Unicode rulles ). I have capability to expand/collapse functions/procedures/records and few other complex data structures, but what if code is lengthy...

JQuery - divs and styles

Hi, I have menu: <div id="head_menu"> <a href="#order"><div>make order</div></a> <a href="#portfolio"><div>portfolie</div></a> <a href="#contacts"><div>contacts</div></a> <a href="#vacancies"><div>vacancies</div></a> <a href="#about"><div>about company</div></a> </div> I add style for it...

WPF TabItem Header Styling

I'm trying to style a TabControl and have got 75% of the way there, but I'm having difficulty styling the actual TabItems: What I am trying to achieve is remove the default ContentPresenter so that I can make the tab items partially transparent with rounded edges instead of the place holder red and green i have now. I'm sure it's pro...

WPF: how to check what template and style is currently used on given control from code-behind?

I have a ListBox and a lot of templates that override/extend each other. How can I check from code-behind, what template currently affects my ListBox? I can access ListBox from code-behind, its Template property gives type of control this template is for, how to get Name of this template? Same about styles. ...

WPF TabControl XP Styling Problem

I'm working on styling a TabControl on a PC runnnig Windows 7 and everything looked fine, but when I tried running it in Windows XP, I get a hideous white border around the TabControl: I believe it's the same problem fighting with luna (described here http://stackoverflow.com/questions/952896/tabcontrol-without-border-wpf-xp), but I'm...

Font properties

Hi there, I have a text file with the following info in it, on a single line: -16777216 Arial 7.8 Bold (-16777216 is the color of the text in ARGB format).. How would I be able to set this text as the font properties for a label at runtime? I have googled this but couldn't find anything related specifically to my problem. Can anyon...

How to override only ItemTemplate in Custom Control

I want to create a Custom Control derived from ComboBox, however if I create custom control from visual studio template, it creates a default style of Control and I have to then open MSDN's control template of ComboBox and then recreate entire combobox style once again an in generic.xaml What I want to do is, I want to create a custom c...

How to write unit tests in spec form?

I have difficulty in many situations to come up with a good unit test names for classes and methods. Typically, I try to follow the form: public class TestContext { [Fact] public void WhenThis_DoThat() { } } Some put words Given, When, and Then on the parts to be explicit. I like it because it seems to make the unit ...

WPF set named style elements from code behind?

I have a user control that applies a style to button, with the style containing a ControlTemplate section. Within the ControlTemplate, there are various UI elements such as an Ellipse and a Path. If I give those elements -- the Ellipse and Path -- a name with x:Name, can I access them from code behind? It appears the style's Ellipse an...

WPF Style.Trigger

Hi, Somebody can tell me why this trigger doesn't work: <!--Style--> <Style x:Key="Test" TargetType="{x:Type Expander}"> <Style.Triggers> <Trigger Property="IsEnabled" Value="false"> <Setter Property="IsExpanded" Value="false"></Setter> </Trigger> </Style.Trigg...

How to change control template from Style.Triggers

I've done it this way: <Style x:Key="Button" BasedOn="{StaticResource LoginButton}" TargetType="Button"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Grid> <Border CornerRadius="4"> <Border.Background> ...

WPF - MultiTrigger in ControlTemplate, strange behaviour.

Okay, I've not done much WPF lately and this is confusing me. I have a Style defined for RadioButton, which uses a ControlTemplate with a MultiTrigger. The gist is that I want a Border to become opaque when the mouse either hovers over it or when it's IsChecked is true. So I have the MultiTrigger, which animates the Opacity in and ou...

using getElementById to retrieve styless in CSS

Why is the first alert box empty, but the second one says 100px? I'd expect the first box to say 300px.. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="Content-Type" content="text/html...

How to output JTextPane styled contents to HTML, including custom style?

I currently use a JTextPane to allow users to add/edit text. It allows bold/italic/underline (and I plan to allow links in the future). It also allows users to drop buttons in, which are inserted as custom styles. The panel looks like: I would like to be able to save/load content as HTML - the content will be incorporated in a Flash s...

Does functional programming mandate new naming conventions?

I recently started studying functional programming using Haskell and came upon this article on the official Haskell wiki: How to read Haskell. The article claims that short variable names such as x, xs, and f are fitting for Haskell code, because of conciseness and abstraction. In essence, it claims that functional programming is such a...

Declaring a looooong single line string in C#

Is there a decent way to declare a long single line string in C#, such that it isn't impossible to declare and/or view the string in an editor? The options I'm aware of are: 1: Let it run. This is bad because because your string trails way off to the right of the screen, making a developer reading the message have to annoying scroll a...

tr:nth-child(even) help. how to apply to one class?

im not very good with css and i need some help. i have a table where i want every other row to be gray and the alternating rows to be white. but i only want it to happen on one particular table. i added some code to my css: tr:nth-child(even) { background: #CCC; } tr:nth-child(odd) { background: #FFF; } but the proble...

Winform style issue: Windows classics style?

In one application I'm suddenly getting a style that looks like windows classics. It looks good in the Visual Studio designer (left on the image) but when I run the application it looks like windows classics style (right on the image) and I can't find it. I tried to create a new clean window and add one button to it and that also looks...

Proper notation using doubles

It is more stylistically acceptable in java to write constants in double operations with or without ".0" ? As in, double var= 200.0; double d= var/250.0; double h= 1.0 - d; vs. double var= 200; double d= var/250; double h= 1 - d; Thanks ...