wpf

Morae Screen Text search not capturing screen text in WPF app

When I try to use Morae Manager 3.0 to run a Screen Text search on a recording of our prototype (coded in WPF, .NET version 3.5 SP1), the only things that come up are the window titles. We are using Windows XP. Even when I search for something that is editable, like text typed into a text box, it does not come up. Screen text for thing...

How Do You Automatically Set the Width of Columns of a Databound ListView

I have a databound list view and can set all the column widths manually except for the last. The data length of the last field varies greatly. The last column needs to expand to handle the width of the data and if greater scroll. I have tried setting the width of the last column to some very large number, but that drives the column he...

Letterpress in WPF

How can I achieve the letterpress effect on a text in .NET WPF? ...

Binding IDataErrorInfo to window IsEnabled button property

I have a WPF sub window with some input controls that the user has to correctly fill before pressing Ok button. I have already implemented the interface IDataErrorInfo to validate all properties bound to UI Controls. Now I would like that the IsEnabled property of Ok button is True only if ALL controls are valid, otherwise it has to be...

How do you debug wpf relativesource throwing errors on load?

I'm working with a WPF dialog window that contains a ListBox. The list box can display both an 'icon' and 'list' view. To accomplish this, we used ListBoxItem styles that are dynamically applied to the ListBox, as well as a pair of corresponding ItemsPanelTemplates. As is, it displays beautifully. However, when loading this dialog we ge...

What is the WPF XAML Data Binding equivalent of String.Format?

Or, to be more clear, how can I format a block of text (in my case, to be included within a tooltip) such that some portions of the text come from bound values. In plain C# I would use: _toolTip.Text = string.Format("{1:#0}% up, {2:#0}% down", Environment.NewLine, percentageOne, percentage2); However the WPF XAML markup for a Tex...

How do I access Mouse movement events in WPF regardless of where the mouse is?

I have tried to use the MouseMove event to track the position of the mouse. protected override void OnMouseMove(MouseEventArgs e) This works when the mouse is over the given UIElement (in this case, my application's window,) however I would like to access this data regardless of where the mouse is, and preferably even regardless of wh...

WPF User Control

I want to have a User Control that takes a collection of People (property "Data") and displays them in a list box. When I run my app nothing shows in the listbox. Can you please point out what I'm doing wrong? Thanks!!! public class Person { public string Name { get; set; } public int Age { get; set; } public override string...

Programmatically binding List to ListBox

Lets say for instance i have the following extremely simple window: <Window x:Class="CalendarGenerator.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="447"> <Grid> <ListBox Margin="12,40,0,12" Nam...

WPF RichTextBox Performance

WPF's RichTextBox control's performance is real slow when a 50KB text document is loaded. Scrolling laggy and pressing Ctrl-A to select all the text takes more than 10 seconds. (This is intantaneous on Notepad). I'm not doing any fancy bitmap effects. Is this normal? Even typing on an empty RichTextBox seems a bit laggy than normal. ...

Using FixedPage markup on a Content Model control

Hello! In WPF, I have tried passing the markup of an XPS file's FixedPage to a control that has the Content property (ex. Button.Content = XamlReader.Load()). Example of FixedPage markup: <FixedPage Width="816" Height="1056" xmlns="http://schemas.microsoft.com/xps/2005/06" xml:lang="und"> <Path Data="M 115.52,132.48 L 704.64,132....

Best WPF open source projects

Hi, I have programmed with WPF for more than a year. When I started there weren't so many examples and guidelines to follow, now the situation is much more better. I would like to ask you some help in listing the best WPF (open) source code examples or projects that you suggest to study in order to learn more about project structure, be...

Upgrading a WinForms app to WPF

I have a side project that I wrote a few years ago in WinForms. To better help me learn WPF, I would like to rewrite it in WPF. Ideally, I would like to just modify the current project that I have and rewrite the UI in WPF instead of creating a new project. I'm having some problems doing that. I did the following (using Visual Studio 20...

Running a WPF application on Windows XP

I recently built a new application using WPF, so that I can learn the new technology. Now that I am trying to deploy the application, it appears as if it is running fine on a Vista system, but on a Windows XP SP2 machine with the .Net fx 3.5SP1, it's not able to load the PresentationFramework.dll file. I did some further investigation ...

Round window playing movie using WPF

Is it possible with WPF to create a window that has the shape of a circle and uses a playing movie as the background? ...

Same module multiple times as TabItems

Here's my scenario: 1) Shell with 1 TabControl and 1 region called MenuRegion 2) MenuRegion contains Buttons for each of the available modules (applications). I want to achieve the following using Prism (Composite Application Library for WPF): When one of the buttons is clicked, I need to add a new TabItem to the TabControl, and load an...

WPF M-V-VM: Get selected items from a ListCollectionView?

I've got a WPF app using the Model-View-ViewModel pattern. In my ViewModel I've got a ListCollectionView to keep a list of items. This ListCollectionView is bound to a ListBox in my View. <ListBox Grid.Row="1" ItemsSource="{Binding Useragents}" SelectionMode="Multiple"/> The ListBox has SelectionMode=Multiple, so you can select more...

WPF Grid vs Stackpanel

For WPF/Silverlight layout, is it better to use a Grid with lots of rows and columns, or tons of Stackpanels? ...

Scrolling credits screen in WPF... ideas?

I'm looking to create a (possibly 3D) scrolling credits screen for my app, that is similar to what you might see at the end of a movie, but should be able to include graphics, animations, etc. What is the best way to go about doing this? I'm thinking I could create a very tall UserControl that contains the entire content to scroll and t...

What is the best way to slide a panel in WPF?

I have a fairly simple UserControl that I have made (pardon my Xaml I am just learning WPF) and I want to slide the off the screen. To do so I am animating a translate transform (I also tried making the Panel the child of a canvas and animating the X position with the same results), but the panel moves very jerkily, even on a fairly fas...