styles

accordion style problems

Hello, Thank you for your responce regarding the below answer: "When I need to override the styles applied by jQuery UI elements, I usually add a stylesheet that I load after the jQuery UI stylesheet and put my overrides into it, using the same selectors so that I know that my styles will take precedence. In this case look for the style...

Find out if item exists in Microsoft.Office.Interop.Word.Styles collection

Hi I'm trying to access an item on the Styles collection of a word document, I was wondering if there's a way to know if an item with a given key exists without it throwing an exception. Right now I'm doing something like: newStyle = _document.Styles.get_Item(ref styleName); This works when the item exists, if it doesn't it will fai...

How to put a MouseDown event in a Style?

This works: XAML: <Window x:Class="Test239992.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <StackPanel> <TextBlock Tag="1" Text="Customers" MouseDown="Handle_Click"/> <TextBlock ...

silverstripe - adding styles to 'styles' drop down menu on editor

Hi, from the question above, I thought it would be relatively easy but i can not find any documentation on on how to add styles to the 'styles' drop down menu. can anyone push me in the right direction? ...

Funny css rendering error in IE background-image has "display: block" in it.

There is a funny issue with how IE is parsing/rendering my css. I have the following style defined "background-image: url(/images/leftArrow.png); DISPLAY: block; cursor: pointer;" but for some reason, IE 7 & 8 are combining background and display to make it one property (see screenshot) Any ideas? ...

How to force WPF UI element to use resources from the theme, ignoring app's resources

Is there a way to make a WPF element use (explicitly or implicitly) the resources located in themes even if app.xaml provides resources with the same 'key'-s? I have all of the default controls restyled, and all those styles are merged to the app's ResourceDictionary. Now I have one single XAML file that has a single element which I'd l...

Unable to attach multiple styles in Visual Studio 2008

Helo! I create in my project a folder named 'Templates'. In this folder I store all my DataTemplates declared in various ResourceDictionary files. I am attaching it (so it becomes a StaticResource and I can use it everywhere in the <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> ...

Qt Styles: How to style a widget that uses a .ui generated class?

In my .qss file I'd like to specify the background color of my widget that makes use of the generated class from the .ui file like: #ifndef SPLASH_H #define SPLASH_H #include <QWidget> #include "ui_SplashView.h" class Splash : public QWidget { Q_OBJECT public: explicit Splash(QWidget *parent = 0); signals: public slots: privat...

wpf defining custom properties for styles

I have created a custom button by using a Style and a Control template. I would like to define some custom properties for this button such as ButtonBorderColour and RotateButtonText. How do i go about this? Can it be done just using XAML or does it require some C# code behind work? ...

Richfaces panel styles suddenly wont load

This is really frustrating ... Suddenly the richfaces panel styles have just stopped loading. The generated css links: <link rel='stylesheet' type='text/css' href='/MCSA-web/a4j_3_1_4.GAcss/panel.xcss/DATB/eAFTL4ziAQACswD..mcsa' /> <link rel='stylesheet' type='text/css' href='/MCSA-web/a4j_3_1_4.GAcss/table.xcss/DATB/eAFTL4ziAQACswD...

XAML Styles - how to use BasedOn while overriding triggered setter

I'm using a XAML style to create a custom radio button using my own images. The style uses triggers to change the look of the button based on focus, pressed, etc. Here's the style: <Style x:Key="SmallButtonAsRadioButton" TargetType="RadioButton"> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="SnapsToDe...

Why does WPF Style to show validation errors in ToolTip work for a TextBox but fails for a ComboBox?

I am using a typical Style to display validation errors as a tooltip from IErrorDataInfo for a textbox as shown below and it works fine. <Style TargetType="{x:Type TextBox}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{B...

WPF. How to force listitem to redraw itself?

I have a list box which contains objects describing a person. This objects are only partially filled and are fully filled (time-costly operation) when the item is clicked. I want to alter the style of those objects which have not yet been filled so that partially-filled items are displayed in italics. I made an ItemTemplate <ListBox.It...

Specify width/height as resource in WPF

Is there a way in WPF to specify a width/height as a resource, so that it can be reused in several styles for e.g. margin/padding? ...

Style is not applied to TextBox in WPF

HorizontalContentAlignment is not applied to textbox.... Here is the style definition: <Style TargetType="TextBox"> <Setter Property="HorizontalContentAlignment" Value="Center"/> </Style> and here is the TextBox definition <DockPanel LastChildFill="True"> <TabControl DockPanel.Dock="Top" Name="tabControl1"> <...

WPF Updating styles at runtime

I would like to update the default Window style dynamically at runtime so I can change the FontSize and FontFamily dynamically at runtime. I found that Styles in your resource dictionary are sealed at runtime and cannot be changed, so I used the following method of updating the style: <Style TargetType="{x:Type Window}"> <Setter Pro...

Consistent appearance for Windows Forms applications

Is there a way to apply consistent visual appearance for multiple Windows Forms applications? So that the same color scheme is used, etc? Or you have to do it manually? (I apologize for this question, but I have googled it without any real answer - a couple of pointers in the right direction or a few links would be enough. I have also s...

List Item background is changing on scroll

I have a background color applied to a ListView <style name="CKButtons"> <item name="android:windowBackground">@color/window_background</item> </style> but everytime the list is scrolled the background color changes back to the system default (black). When the scrolling stops the color goes back to @color/window_background. The ...

set button datacontext to multiple elements

I've got a button that I need to be disabled when validation errors occur in my window. The items on which these errors can occur are all textboxes. I've bound my Button's datacontext as such: DataContext="{Binding ElementName=txtEmail}" Now with this, I can set the button style to disabled when validation errors occur in the email...

WPF Menu Items Styles

Hi, I have an application resource of the following <Style TargetType="{x:Type TextBlock}"> <Setter Property="Background" Value="{DynamicResource windowTextBackColor}"/> <Setter Property="Foreground" Value="{DynamicResource windowsTextForeColor}"/> </Style> So all the text blocks in my application should assume those colours....