wpf-styles

[WPF] Control focus styling

Hey guys, in above image you would notice that, doted rectangle indicating ComboBox is focused But the problem is it exceeding the text area of ComboBox... how do I align it with text area WPF Style? Thanks ...

Restyling just part of a wpf control. Is it possible?

I want to restyle just part of a WPF control. (Specifically, I want to make the scroll buttons on a ScrollBar bigger) Now I can do this no problem. I extracted the default style. Made the required tweaks and included the modified style in my application. The problem is that I have to include the entire control template in the replacem...

Inheriting from Application Styles (WPF)

I am trying to inherit application-level styles for a certain Window in my WPF application, but I'm having trouble getting it to inherit rather than simply override the existing styles. In App.xaml (under the App.Resources element) I define a style as such: <Style TargetType="Button"> <Setter Property="Padding" Value="6"/> <Set...

wpf ContentPresenter wont enable/disable

Hi, I've overridden a ComboBox in order to add an extra button at the end of the combo - i'm using this to help navigate round my application. Its a M-V-VM App that has an Edit-Save/Cancel mechanism that disables or enables the controls depending on whether or not the user is in 'edit mode'. I wanted my navigation button to always be...

WPF :Inheriting styles for third party controls

Hi, I am using telrik components for wpf. I want to get "Select all" Check Box on Grid Header cell I have Common ResourceDictionary Style.Xaml , it has <ResourceDictionary xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"&gt; <Style TargetType="telerik:GridViewHeaderCell"> <Setter Property="FontWeight" Va...

WPF TypeConverter ConvertTo not firing

Hi, I have a dependency property in a class which I need to be converted to a string. I have added the TypeConverty attribute on the property. The type I am converting is the .net Style class. [TypeConverter(typeof(BulletStyleTypeConverter))] public Style BulletStyle { get { return (Style)GetValue(BulletStyleProper...

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...

WPF Custom Themes

Hi, I have a simple question which is giving me some difficulty. I have downloaded a custom them for WPF of the net. Now i want to apply this theme to my App instead of the default one. How do i do that, Do i do it in XAML or in Code ? Thanks Iffy ...

How to disable border of WPF button when click it?

How to disable border of WPF button when I click it? I have create button like below, everything work fine except when I click on the button. <Button Background="Transparent" BorderBrush="Transparent"> <Button.Content> <StackPanel> <Image Source="xxx.png" /> <TextBlock Text="Change Password" /> ...

multiple styles wpf from which user can choose

I want let the user choose what style my application has.Small example would be 2 buttons, if user presses button 1 then the background color turns red, if the user presses button 2 then the backgroundcolor turns green. How do i do that? do i use multiple resource dictionaries? and apply them when the button is pressed? Whats the most ...

WPF - Catch a CLR event in A Style template

I have a style for a ListBox. In the listbox style I have a style for the ListBoxItems. All of this is in the section. I want to catch the IsEnabledChanged event for the Listbox Items (see this question for why). I tried setting up an EventSetter, but it can't see the event because it is not a "routed event". How can I attach an ev...

WPF - Change a style in code behind

I have a list box that displays the results of a TFS Query. I want to change the style of the ListBoxItem in the code behind to have the columns that are included in the query results. The style for the ListBoxItem is defined in my Windows.Resoruces Section. I have tried this: public T GetQueryResultsElement<T>(string name) where T :...

WPF DataTemplate Binding BUG: AmbiguousMatchException

Hello! Here are the DataTemplates: <DataTemplate DataType="{x:Type data:Item}" x:Key="ItemTemplate"> <Border/> </DataTemplate> <DataTemplate DataType="{x:Type data:StyleItem}" x:Key="StyleItemTemplate"> <Border> <ContentControl Content="{Binding Item}" ContentTemplate="{StaticResource ItemTemplate}"/> ...

What is causing the error 'Must specifiy both property and value for setter'?

I have a style which toggles the visibility of an image depending on an underlying DataContext property. Unfortunately I keep getting an error: 'Must specify both property and value for setter' The XAML looks like <Style TargetType="{x:Type igDP:LabelPresenter}" x:Key="BuySellLabelStyle"> <Setter Property="Template"> ...

Styling a UserControl in WPF from another assembly

Hi, I have a WPF user control defined in an application assembly. I'm trying to style the user control based on styles in another (skin or theme) assembly. I don't want the theme/skin assembly which contains the resourcedictionary with all the styles to reference the application assembly. Is there any way of doing this? E.g. WPFApp...

Styling WPF controls inline with Infragistics themes

Hi, we are using Infragistics WPF controls (e.g. xamDataGrid, xamDockManager etc), and we will be using the Infragistics Office 2007 Blue theme which these controls support. We also want to style the rest of the application (i.e. standard WPF controls) using the same Office 2007 Blue style. What's the best approach? Are there Office ...

WPF Style Inheritance

I have this XAML. If I remove the StackPanel.Resources section I get the styles that were defined at the application level. If I leave it in, then I only get the new styles. How to I make it combine both the local and global styles? <Window x:Class="MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" x...

WPF: How do I discard all inherited styles?

How do I tell a control or block of controls to not inherit any styles and revert back to the defaults? I need this because I have an overall theme that mostly works, but for one piece really screws up my design. ...

WPF: Change background color for selected ListBox item

This is my XAML so far. <ScrollViewer Grid.Column="1" Grid.RowSpan="2"> <ListBox Background="Black" ItemsSource="{Binding Path=ActiveLog}" > <ListBox.ItemTemplate> <DataTemplate> <Grid Background="Black"> <Grid.ColumnDefinitions> ...

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> ...