wpf

Extending/overriding a style in a resource dictionary

I have a BaseSkin and multiple UserSkins in a separate dll from my WPF application. Depending on who is using the application, the base skin and one of the user skins will be merged into a resource dictionary and loaded for the application to use. What I'm aiming for is the ability to specify a style in a BaseSkin file, and then on a s...

Patterns: Render engine allowing editor integration?

I am trying to determine that if (before I start) on a new project I can pick some suitable patterns which will help with development as the project gets more complicated. The Scenario To have an application that draws 'simple' lines on the screen. Ideally encompassed into a 'Render Engine' which I can package into Silverlight, WPF dem...

Object viewer control needed (like QuickWatch in VS)

Anyone know of any controls that you can add to your application to allow the user to check out the content of an object? I'm thinking of something like QuickWatch in Visual Studio, just list all properties of an object and its values and allow the user to drill down. I started writing one using reflection but it turned out be a lot of w...

WPF Application that Listens for Commands Even When not the Active Application

I would like to configure a WPF application to function in a similar way to SlickRun. I would like to be able to minimize the application to the taskbar, then while in any other program, press a key command (ex: ALT + X) and have my application appear to the user. Can someone point me in the right direction? ...

WPF: System.Windows.Int32Rect ---> System.Windows.Int32Point?

You know how System.Drawing.Rectangle was replaced by System.Windows.Int32Rect? (As far as non-floating-point shapes are concerned ...) Is there a similar new object for an integer point or size? If not, I'll just use System.Drawing - but that kinda seems like a minor mix of two platforms that ought not to me mixed. Anyway, what do...

WPF: How can you set ToolBarOverflowPanel children to be the same width?

In a Toolbar, how do you set it's overflowpanel children to be the same width, one child underneath the other? Is there a way to override ToolBarOveflowPanel to act as a stackpanel? Databinding / manually setting the width of the objects that are in the toolbar sets the width of all of the items in the toolbar, not just those that appe...

Spontaneous application execution abort in debug

A WPF application. Debugging. Stop on break point. After few seconds Visual Studio (2008) spontaneously aborts the application execution. It is never mind what I do after stop on break point: even if I do nothing. With very simple test WPF application everything is OK with debugging. Any ideas? ...

Designing WPF Windows for Free?

Hello, I'm starting a WPF project in a "free tools" environment. I'm currently working with the designer in Visual C# Express 2008, and directly with the XAML, both of which are very limited in design capabilities. My understanding is that Microsoft Expression Blend is not available for free (except for limited time trial). Is Expressi...

Embedded IronPython scripts and converting types

I've got a WPF application that embeds IronPython to use as a scripting language. I've got an object model that IronPython scripts can use to do 'stuff'. However I've come across a strange problem that I've solved in a way that I don't believe is correct. In my script I want to type the following to set the location of an object in WPF...

Binding to Command from outside a UserControl

Hello. I have a simple UserControl containing Label, ComboBox and Button. In brief, it is to be used throughout almost all of my Views many times, each time supplied with different ItemsSource and CreateItemCommand using Bindings to my ViewModel properties. The Label and ComboBox are part of another UserControl (LabeledComboBox) which ...

WPF TextBox.Focus() annoyance

Hi. I'm very new to .Net and WPF and have a problem. The code is a snippet. I have those TextBoxes to enter dates. I check on correct input using GotFocus and LostFocus events. <TextBox Name="sdDay" Width="40" Text="Day" GotFocus="DateDay_GotFocus" LostFocus="DateDay_LostFocus" Padding="5,5,5,5" HorizontalContentAlignment="Center" Focus...

How bad is the WPF Learning Curve?

I've read and heard from several people that WPF has a pretty steep learning curve (depending on how knowledgeable or experienced you are). Seems like most people can get the demo or starter projects to work, and then find themselves getting stuck for lengths of time on miscellaneous problems. I'm curious what specifically is difficult ...

Why do I get a "Metafile not found" error when trying to compile a WPF application?

I had to rebuild a project in my application. I created a new project, created each file, and copied the contents of each file into the new project one at a time making all the necessary changes. Now when I try to compile the project, it gives me three errors: The metafile c:\projects\project1\CustomerModule\bin\Debug\CustomerModule....

Manually parse string as XAML Attribute

How does the XAML Parser convert the string "Red" in Foreground="Red" to a SolidColorBrush? Allthough I know the Types have System.ComponentModel.TypeConverter defined, I doupt that the WPF XAML parser acutally always uses those to convert the string to the brush. Are there any XAML APIs apart from XamlReader.Load (wich wants a valid xml...

How to play flash in WPF

Hi Guys Is it possible to play flash in WPF?I need to create user control wich play file .swf ...

Getting the text of the menu item that was clicked?

Hi, I have a context menu that's bound to a list of strings so that each menuitem's text is an element of the string list. Each menuitem is set to the same event handler. What I'm trying to do is to figure out is which menu item was clicked when when the event handler is called. I would think it would be pretty straight forward to do,...

WinForms Interop, Drag & Drop from WinForms -> WPF

Hello all! I'm trying to drag data from the Winforms portion of my application on a WPF controls that's contained inside an "ElementHost". And it crashes when I try doing so. Trying the same thing but from Winforms to Winforms works fine. (See example code below) I need help on making this work... have any clues what I'm doing wrong? ...

WPF user control with a property of type Enum

I have a usercontrol called "InputSensitiveTextBox" that inherits from Textbox. It has a property I define called "CurrentInputType", which is of type "MyControlsNamespace.SupportedInputTypes" (with values Keyboard, Mouse, Touchpad, VirtualKey). I need to have this property be set in Xaml just like I might set "HorizontalAlignment" or ...

Strange HorizontalContentAlignment (non) behavior

I define a style in app.xaml: <Style x:Key="textBoxCenter" TargetType="{x:Type TextBox}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> </Style> I use the style in window1.xaml: <TextBox Style="{StaticResource textBoxCenter}" Background="BlanchedAlm...

XAML design view broken in visual studio 2008 for silverlight 3?

...