wpf

Automated smoke testing of a WPF App?

Hi, We've got a WPF app we'd like to run automated smoke tests on it. Simple tests like load document, save document, etc, etc. I was wondering if anyone could suggest existing frame works or applications that would help with that. Thanks! ...

WPF Overlaying a Image with a Button

I have a custom TabItem with a close button(denoted by X) on it so it can be closed easily. In this tab i want to put a Image or Border Item, that is centered with the close button in the top left corner The Control Template for this is <ControlTemplate TargetType="{x:Type local:CloseableTabItem}"> <Grid SnapsToDevicePixels="tru...

PowerShell ISE WPF control in-lining

I have heard that the PowerShell ISE uses the same WPF text editor as VisualStudio 2010 and the Oslo IntelliPad. I know that you can extend this editor in VisualStudio by inserting your own WPF control into the editor's XAML file. My question now: Is this also possible with the PowerShellISE? Did anybody try to do this yet? ...

WPF Mouse Click Off Event

I know there is a mouse click event for every control but is there a way to determine when the mouse click is not on the control? ...

How Print multipage WPF?

Hi, i have a visual and i wish print i multipage .i have more page to print out each content stay in the StackPanel(it will increase storing datacontext like a Report) i wish create like a pageBreak in the StackPanel to fix the pagesize so begin to print in one more page but i don't know how create this feature. Do you have nay advice ,...

BInding for Listbox in WPF

Hi, I have a Textbox in my Main form what i am trying to achieve is when i enter some text in the textbox and click on the button it should popup a window which has a listbox and on selecting some item in listbox the selected item should get displayed in the Parent form textbox. I am stucked while setting the SetBidding Property for Li...

Implement a WYSIWYG document editor in WPF?

How will you approach to implement a WYSIWYG document editor in WPF? This editor is going to be very similar to WYSIWYG html editors, but back-end data structures do not have to be html. Currently, I have a working version based on mshtml control implemented in c++ (this is pretty much like MS InfoPath). I'm seeking to take out the msht...

Keybinding a RelayCommand

I'm using the RelayCommand in my app. It's great for putting the code in the viewmodel, but how do I bind keystrokes to my command? RoutedUICommand has its InputGestures property, which makes the command automatically be invoked when I press the keystroke. (As an added bonus, it even makes the keystroke display in the MenuItem.) Unfortu...

MVVM and commands that show more GUI

I like the MVVM idea of a RelayCommand that's exposed by the ViewModel. That's nice and elegant, for operations that can be done with no further user input. Simple. Testable. However, not all operations are UI-less. Some require confirmation ("Are you sure you want to delete?"). Others require more information yet. Opening a file might ...

Is there a way to convert WPF binding markup to and from an instance of the binding class?

For example I have the following binding markup Text="{Binding Path=FirstName}" pretty simply but it could be much more complex, I need to be able to parse this markup and get it into some objectified form such as an instance of the Binding class. Something that could work in reverse, an instance of the binding class to spit out the ...

Circular resource references causing issues?

I've got a WPF application that consists of Pages in a NavigationWindow. Within App.Xaml I create all my pages so that I can reference them when using navigation commands. It goes a little something like this: <Application ...> <Application.Resources> <FirstPage x:Key="first"/> <SecondPage x:Key="second"/> </Application.Resource...

WPF & Mime types

It is about WPF application which generates reports. Reports have simple structure: byte[] m_Data, string m_Mime. Data array is created, mime type is set, now what I need is to display the dialog with same functionality we find in web browsers' - Open/Save/Cancel dialog that opens file in appropriate application depending on response's...

Use a property trigger to change a property that already has a binding.

How can I use a property trigger in a style (or another method) to change a property (ToolTip for example) that already has its value defined by a binding? I have a simple button like so: <Button Name="Button1" Style="{StaticResource ButtonStyle}" ToolTip="{Binding Name}" >My Button</Button> It has a binding on the tooltip t...

Windows 7 Taskbar SetOverlayIcon from WPF app doesn't work

Hi I'm trying to use the Windows 7 Taskbar API to set the overlay icon of the application icon on the taskbar. I've downloaded the samples from Microsoft, but wanted to extract that particular piece of code that does that to avoid adding a reference to a huge brick of code that I won't use most of. I have a simple WPF app in VS 2010 o...

WCF Named Pipes within WPF application

How would you run a WCF named pipe service in the background of a WPF Windows application? I can't seem to find any samples of running the WCF server within a WPF application. Any ideas? I am currently using the following code in the Application_Startup. Does this need to run with it's own thread? Using Host As ServiceModel.Serv...

When was System.Windows.Threading.Dispatcher.Invoke(System.Delegate, System.Object[]) added?

Some people using my app seem to be getting System.MissingMethodException: Method not found: 'System.Object System.Windows.Threading.Dispatcher.Invoke (System.Delegate, System.Object[])' Does anyone know in what version of the framework this overload was added, is it safe to use?(its not marked deprecated). ...

WPF handling RoutedEvent from UserControl

Hi, I have a UserControl, default one generated by VS, only TextBlock is added: <UserControl x:Class="MyNameSpace.Presentation.MyControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="myControl"> <Grid> <TextBlock x:Name="SomeTextBox" Text="So...

Merging dlls into a single .exe with wpf

Hi, I'm currently working on a project where we have a lot of dependencies. I would like to compile all the referenced dll's into the .exe much like you would do with embedded resources. I have tried ILMerge but it can't handle .xaml resources. So my question is: Is there a way to merge a WPF project with multiple dependencies into a si...

xbap custom loader in internet explorer

I have a xbap application, which works fine. But the problem is that I've nested the xbap app within an iframe. The site`s background color containing the iframe is black. I want to change the xbap application loader (downloader) background color to fit the site appearance. Any ideas? ...

Auto-update of my view

Hi all, I have created an application which has the following: A database created in VS2008, LINQ to SQL A view of the database: XAML part <CollectionViewSource x:Key="CustomerView" Source="{Binding Source={x:Static Application.Current}, Path=Customers}" /> C# part public IEnumerable<Customer> Customers { get ...