wpf

What is the Best WPF Ribbon Control Suite?

I'm going to add a WPF Ribbon UI to my program. What is the best suite of WPF controls including a ribbon control, based on your experiences? Thanks! ...

How do I expand a control in WPF to make room for error messages in an ErrorTemplate?

I have a WPF window that uses validation. I created an error template that puts a red border around an element that fails validation and displays the error message below. This works fine, but the error message is rendered on top of any controls beneath the control with the error. The best I can tell, this happens because the error tem...

WPF Rounded Corners background bleeding through

I'm making my first foray into WPF - I have a simple form with a popup defined for inline help. I'm using rounded corners, and for some reason a black background is bleeding through around the corners. I don't understand which element is causing the problem. I assume it's something blindingly obvious which I'm just not seeing. Here...

Am I a discoverer of a bug in the WPF engine?

We have a MFC 8 application compiled with /CLR that contains a larger amount of Windows Forms UserControls wich again contain WPF user controls using ElementHost. Due to the architecture of our software we can not use HwndHost directly. We observed an extremely strange behavior here that we can not make any sense of: When the CPU load i...

How do I get the WPF designer pane to see my resources?

In my application I have various styles and templates that are used in several classes. I've defined these in my so they are visible from all child objects. However during design-time the WPF designer can't see these resources, complains they were 'not found' and demands the errors must be fixed before reloading the designer. Is ther...

WPF databinding: database or objects?

Im trying to create this: Tag1 has the erdered list of objects O1, O3, O2 Tag2 has the erdered list of objects O1, O4 Every time I click a tag, I want to see the list of objects. So clicking Tag1 would show in a listbox: O1 O3 O2 But I would like to keep the auto update so every time I edit or add/delete an object it auto updates (...

C# TWAIN interaction

Hello, I'm trying to set up a C# application which uses TWAIN example from http://www.codeproject.com/KB/dotnet/twaindotnet.aspx This works fine except that I need to cast Form to IMessageFilter and call IMessageFilter.PreFilterMessage() to catch TWAIN callbacks. Also I need to start this filtering by calling Application.AddMessag...

Why can't I double-click a button to create an event handler in Silverlight 2.0?

In WPF, ASP.NET, WinForms, I create a button, double-click on it and fill in the event handler. In Silverlight (with Visual Web Developer 2008), I make a button, double-click it but nothing happens. Is this not supported when writing Silverlight applications for some reason? Do we have to write these event handlers by hand? ...

Where can I see some good examples of what WPF is capable of?

What is some good software that is written with WPF? I keep hearing about what it can do. I would like to see it in action. ...

wpf tooltip not shown on usercontrol or its children

Hi, I have a canvas with user controls arranged on it. When a tooltip is assigned to the usercontrol or one of its children, that tooltip does not show (open event does not get fired either). I do not explicitly disable any of them. I've placed plenty of tooltips elsewhere in the application and they all show, except the ones on the use...

WPF window from a Console project?

I recently started a C# project (VS 2008) as a 'Console' project where I wrote a few libraries, test programs, etc. Now I'd like to add a couple of WPF windows, but it looks like console project won't let me do that. I'm coming from Java so this is a little strange. How can I add a WPF form (which I will instantiate my self from my "m...

WPF equivalent of Application.AddMessageFilter (Windows Forms)

Hello. I was using Application.AddMessageFilter() in my WinForms applications (when working with unmanaged code). Now I'm switching to WPF and can't find this functionality. Please advice where it can be found or implemented. Thank you. ...

WPF translation transform

How can i get the new bounds after applying a translation transform to a WPF mesh geometry 3D? ...

Who has the best metaphor for WPF dependency properties?

I'm reading WPF Recipes in C# 2008: http://www.apress.com/book/view/9781430210849 and starting on the third recipe they asssume you know how dependency properties work. So after a little googling, I understand in general that these are properties of an object which when placed inside another object "adapts to the context" to the host...

Inherits from TextBox in WPF

Hello, I am trying to create a new WPF control called NumericTextBox. It inherits directly from TextBox. I added a new DependecyProperty called NumericValue that it could be used to bind a numeric property. Now, I would like to override the behavior of the TextProperty so that it could be accessed only as ReadOnly. Is it possible ...

WPF Layout: word-wrapping not working

Why does the text in my TextBlock extend out to the right beyond my canvas even though I specified word wrap? <Window x:Class="WpfApplication6.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" SizeToContent="WidthAndHeight"> <...

WPF .NET Best way to trigger an event every minute

I have an app that needs to check a database table every minute. The table is indexed by the time of day and so the app needs to run this check every minute. What's the best of way of doing this? I can create a background worker thread but if I set it to sleep for 60 secs after each check I will eventually miss a minute because of the...

Image representation suitable for both WPF and Windows Forms

When working with Windows forms and images, I deal with System.Drawing.Image descendats. When I work with WPF I deal with System.Windows.Media.Imaging.BitmapSource class. Is there a UI framework independent way of referencing a memory image? Maybe it would be a Intptr or byte array? Thank you. ...

How to make clickable color areas with rounded corners in WPF, Button or Border/Textarea?

I want to have four colored areas which are clickable. I can user TextBlock in a Border to get the color areas, but then neither of them have a Click event. So I can make the whole thing a button, but then it doesn't have rounded corners and I can't seem to change the background. What is the recommended way to go about this, here is wha...

How do I get the actual value of a DependancyProperty?

I have a small UserControl and it needs to know the Background Brush of the control on which it's being rendered. However, if I look in the Background property of the UserControl it comes back null. If I call GetValue(UserControl.BackgroundProperty) it also returns null even though up the Visual tree it is definitely being set. Seems...