wpf-controls

SolidColorBrush thickness property

Hi All, Is it possible to set thickness property of SolidColorBrush. The reason I am asking is that I have a IValueConverter binding to Textbox Border BorderBrush property and I am dynamically setting the color of the textbox, <Window x:Class="MyWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://...

WPF ComboBox displaying Object Type after styling

Hi In my project I am using a ComboBox with my custom objects like Employees and using DisplayMemberPath="Description". This all works perfectly as expected. Because this application is targeted to be used with a touchscreen, I had to style the scrollbar and make it wider which meant that I had to create a new template for the ScrolVie...

What method can I override in GridViewHeaderRowPresenter to prevent it from drawing some columns?

The thing is that I created a custom column that inherits from GridViewColumn, and I added a Visibility dependency property to it. Now I want to create a custom GridViewHeaderRowPresenter, that does not draw the columns when their visibility is hidden or collapsed, but other than the OnRender() method, I can't think of anything else. Th...

'Graying Out' a WPF button image?

I have a simple Button control that contains an Image object as its content. I want so set the Image opacity to 0.5 when the Button is disabled to provide an additional visual cue as to the Button status. What is the simplest way to accomplish that result in XAML? Thanks for your help. ...

HeaderedContentControl ItemsSource

Hi Why there is no HeaderedContentControl ItemsSource property? How then can I databind to a list of objects to be represented by HeaderedContentControl? Thanks John ...

WPF Dialog Box Property Value Editor access source(parent) control

Hello, I have User control in WPF with dependency property DEP1 on which i set value by DialogPropertyValueEditor(code below): Public Class OPCItemDialogPropertyValueEditor Inherits DialogPropertyValueEditor Private res As New EditorResources() Public Sub New() Me.InlineEditorTemplate = TryCast(res("OPCItemInlineE...

How Dispatcher differs from the background thread ?

How Dispatcher concept in .NET 3.5 in WPF differs from the background thread in .NET 2.0 ? For example what will be difference between statements below: delegate.Invoke/BeginInvoke AND this.dispatcher.Invoke/BeginInvoke ...

WPF TextBox SpellChecking Problem

How can I change the spellchecking language of a WPF textbox to french using XAML? I tried this but it doesn't work. <TextBox AcceptsReturn="true" SpellCheck.IsEnabled="true" FontSize="12" BorderBrush="Blue" Height="100" Language="fr-fr" /> French is supposed to be one of the 4 supported languages for spellchecking in WPF so I don't u...

Binding the position and size of a UserControl inside a Canvas in WPF

Hi. We need to dynamically create (i.e. during runtime, via code-behind) UserControls and position them on a Canvas. We want to bind the position (Canvas.Left and Canvas.Top) and width of those sizable (!) and draggable (!) UserControls to a ObservableCollection<>. That measn when the user drags or resizes the control, the datasource get...

Add assemply for user control

Hi How to add a user control to the project manually.. I add namesapace in the one of the page file.. when i execute it.. nothing displayed on the page.. i am using one text box and button inside my custom control.. pl help me ...

WPF ListBoxItem double-click?

The WPF ListBox doesn't have a DoubleClick event, at least not as far as I can tell. Is there a workaround for this issue that would let me double-click on an item to have an event handler do something with it? Thanks for your help. ...

WPF Storyboard issue

In the following template, the button is displayed with Normal image when the application is started, but when the mouse is over, the button doesn't get changed to mouse over image. Appreciate your help!!! I want some solution without major changes in the design. <Style TargetType="{x:Type local:ButtonControl}"> <Setter Prope...

How do I show the drop-down in a combobox in WPF?

When the user starts typing in a combobox, auto-complete kicks in and shows the closest match. What I want to do is have the drop-down become visible as well, as if the user clicked the down arrow. Can this be done and if yes, how? ...

WPF Storyboard flicker issue

With the code below, the control flickers whenever the image is changed for MouseOver/MousePressed? I am using Storyboard and Double animation.The image display for the button borderis very smooth with WPF Triggers but not with Storyboard. Can anyone help me to fix this issue? <Style TargetType="{x:Type local:ButtonControl}"> ...

Examples of WPF forms for usual CRUD scenarios

There are plenty of such examples shown for Silverlight at recent Microsoft conferences ( Creating amazing LOB applications in SL 2,3,4 ... ) . They even invented DataForms starting from Silverlight varsion 3. Basically I need an example of grid view ( maybe with possibility to filter, preferably DataGrid control ) from which we may ...

WPF custom BalloonTips problem with multithreading

Hi, I have read other related question but i cant really get them to relate to this so I thought it were best to ask, Im pretty new to WPF and so on so please bear with me. I am using this http://www.codeproject.com/KB/WPF/wpf_notifyicon.aspx api to work with custom WPF Windows (in particular FancyBalloon). However, i'm coming across ...

Creating transparent background in WPF

I have a button with a backgroun image of color white. My button is sitting on the toolbar which has a bacground color of Blue. When the button is sitting on the toolbar, the button looks white, however I want it to look like blue as the the background color of toolbar is Blue. How should I achieve this in WPF.. Please let me know. ...

Winform custom control in WPF

Hi, I'm inserting a custom winform control in a WPF/ XAML window, however i'm realising that the sizing seems to be very different, what i designed in winform to be 730pixels wide for instance, when placed via a WindowsFormsHost, in a container 730pixels (or at least i think they're pixels..) wide, the control looks much larger and doesn...

How to get the default syle of my Button in WPF?

I have create a Button style under Resource folder of the main application. I have added the reference of this button syle in the App.xml of the main application. Now this style is applicable to all the buttons in the main application or any other assembly. I want if I want to override my custom style of button to the normal button sty...

Best practices for dimensioning control panels in WPF

Hello: I defined a Window in WPF, into this one I put a "stack panel" and inside this panel I put a "tab control" and some "button controls". When executing the program, I would like that when I have to resize the window using the mouse, the stack panel and all controls inside it can also be resized automatically and proportionally to ...