wpf-controls

WPF Edit Mask

What is the easiest way to specify an edit mask in WPF for a simple Text Box? e.g. one that transforms 10000 to 10,000 as you type. ...

Differences between WPF Frame and WebBrowser controls.

I'm working on a web-enabled media center which will be able to load video feeds into a gallery style view. (like Cooliris) Rather than loading thumbnail images of each video, I plan to load the actual video so it can be played in-place and/or popped out to fullscreen. This means I need to host a bunch of flash-player instances 'inside...

WPF DataGrid Styling

Does anybody know/have an example of how to change WPF DataGrid layout to be something like card-view or anything else, not just stack of rows? ...

Expose multiple command in WPF user control

A better explanation, I hope: I have a toolbar with 3 buttons on it, all three bound to a Command (including a CommandParameter) this toolbar is used on several screens the xaml of the toolbar is exactly the same over all those screens I want to remove the toolbar instance and replace it with a user control that provides 3 commands, ...

WPF EDitable ComboBox

Hi! I want to create editable combo box with the following properties: 1. Bind the text property to my data model. 2. The data model may override the changes in the GUI, even in Selection changed. E.g. I can choose from 1, 2, 3 I choose 2, but some component down under changes it to 3. 3. Update the data model on the following events: ...

trap the click event for a button that is in the resourcedictionary

I am trying to trap the click event for a button that is in the resourcedictionary, I get a error WpfApplication1.MyResourceDictionary' does not contain a definition for 'GetTemplateChild' and no extension method 'GetTemplateChild' accepting a first argument of type 'WpfApplication1.MyResourceDictionary' could be found (are you missin...

Get RTF from RichTextBox

How do I get the text in RTF of a RichTextBox? I'm trying to get like this, but the property does not exists. RichTextBox rtb = new RichTextBox(); string s = rtb.Rtf; This does not work :S ...

WPF/XAML Style set Property for child items?

Hello, I working on a XAML style for my controls. The code below is for setting the color of a stackpanel. It works fine but there is something else I want to do. If the trigger is activated I want to set the font color for all child items inside the stackpanel. At the moment I only have textblocks inside the stackpanel and I know I co...

How do I specify a control as a property in my user control in WPF?

My XAML: <TextBox x:Name="myTextBox" .../> <MyExtender TargetTextBox=? .../> My C#: MyExtender : UserControl { public TargetTextBox { get; set; } } How do I set the TargetTextBox property in XAML? ...

WPF Frame control

I have a WPF application containing a Frame control. The frame control displays the html content. The html page contains a javascript function which i want to call after html page is loaded on Frame and from the WPF code ? Is there a way i can call javascript mehtod of html page loaded in WPF frame control and from within WPF code? ...

Free Syntax Highlighting .NET Editor

I need incorporate a syntax highlighting editor control into my application. It is required that the control be free and native .NET code only so the Scintilla.NET control is not feasible. The reason for this is because it is a ClickOnce application. I would like answers that use WinForms or WPF. It doesn't have to be from the same vend...

Custom user controls in WPF with vector graphics

I've created the graphics for the user control as a vector graphic and imported it into Expression Design. So far everything worked w/o problems. However I then exported it as XAML and opened it in VS. The XAML consists of a canvas and several Paths. I created a user control in XAML, now I want a mouse click event, which is triggered if ...

What is the best way to create toolbar buttons with separate active/disabled images in WPF?

I'm working on the toolbar for a WPF application. The icon set we are using has separate icons for normal, hover and disabled states, and I would like to use them. I was wondering what the simplest solution/normal way of doing this is? My first thought was to create a user control "ImageButton" with properties NormalImage, ActiveImage, ...

How can I hide the header of a listview WPF?

I want to be able to hide the header at the top of each grid column in a WPF ListView. This is the XAML for my ListView: <Window x:Class="ListViewTest.Test0.ListViewTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Empty ListView Grid" Heigh...

WPF: Connect UIControls with a rope which behaves physically correct (inspired by Pixelmator)

Pixelmator [1] has a quite impressive GUI. So far I've just played a bit with it. If you are using a filter, which is applied to a part of a picture, the window in which the parameters of the filter can be set is connected with a rope to the concerning part of the image (see 2). However I was wondering about two things. How do I impleme...

WPF Text Formatting in GridViewColumn

I want to apply a format (align text, format for the currency 0000.00) to the columns in the GridViewColumn. <GridViewColumn TextBlock.TextAlignment="Center" Width="80" DisplayMemberBinding="{Binding XPath=Name}"/> The idea is the following one: In the columns (GridViewColumn) the text that our could apply a format to him (Aligners o...

WPF Custom Control Resources

I have a custom control which needs to configure a MultiBinding in code, which requires a IMultiValueConverter. Is it good practice to use FrameworkElement.FindResource and require the Converter be definied as a resource or should I instanciate the converter in code? I could have this in the theme Resource such that it is always there,...

WPF soft phone control

We have a custom built WPF CRM and are looking to integrate a soft phone client so that operators don't have to manually enter phone numbers. From what I can see on the web there are no WPF soft phone clients and it looks like we'll have to build our own from scratch. Does anyone know of any WPF soft phone implementations out there? I ...

Binding Controls to more than one DataTable

This is probably an odd question but here I go (do let me know if this is a bad database design or just a weird situation I'm in). I have two tables in my database: ProductGroup and Parameters. One contains information about various product groups as per its name and the other one contains information about various parameters that can b...

WPF Media Element Video Source

Hello, I try to set video source in XAML code, video doesn't play: <MediaElement x:Name="bgvideo" Width="800" Height="600"Source="/Videos/BG_LOOP_BIG.wmv" /> So I try to set video source in codebehind, that doesn't play too. : bgvideo.Source = new Uri(@"pack://application:,,,/Videos/BG_LOOP_BIG.wmv", UriKind.Absolute); or bgvide...