WPF performance profiling tools

The WPF Performance Suite is a set of performance profiling tools that allow you to analyze the runtime behavior of your WPF application.

This suite includes the following tools:

  • Perforator – for analyzing rendering behavior.
  • Visual Profiler – for profiling the use of WPF services, such as layout and event handling, by elements in the visual tree.
  • Working Set Analyzer – for analyzing the working set characteristics of your application.
  • Event Trace – for analyzing events and generating event log files.
  • ETW Trace Viewer – Record, display, and browse Event Tracing for Windows (ETW) log files in a WPF user-interface format.

The screenshot below is presenting how to Visual Profiler tool looks like:

Visual-Profiler

Download WPF Performance Suite (x86 version)

PoshConsole – a PowerShell console written in WPF

 

PoshConsole is a modern PowerShell Console. The PoshConsole is written in WPF and including a custom ConsoleTextBox control which could be reused for other purposes.PowerShell Console will also include lots of powerful features like tab-completion and keyboard navigation.It has separate options for setting the window’s opacity, always on top ,show in taskbar and has fully configurable colors.

 

WPFPowerShellConsole

 

Download PoshConsole

Technorati Tags: ,,

Shaped Windows in WPF

In previous versions of Microsoft .Net Framework, creating shaped windows was a time-consuming process that involved Win API calls.Not anymore – one of the modern  aspects of WPF is that you can make  non-rectangular windows in simple way.Creating shaped forms works in the following manner.First, you create an image, which, when we are finished, will act as your window.  Second, you change a XAML to make this image become the form.

  • Create a transparent image file that will be used to set the desired shape of the window.

shaped-form

  • Create a Windows Application(WPF) project and add the image control to it.Remember to make the window transparent as shown in code below
<Window x:Class="WindowsApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WindowsApplication1" Height="300" Width="300"
    AllowsTransparency="True"
    WindowStyle="None"
    Background="Transparent" 
    >
    <Grid>
    <Image  Name="image1" />
  </Grid>
</Window>

 

  • Add code that recreates the functionality that the title bar provided, such as moving the window and closing it.
using System;
using System.Windows.Input;
using System.Windows.Media.Imaging;
 
 
namespace WindowsApplication1
{
/// <summary>
/// Interaction logic for Window1.xaml
/// </summary>
public partial class Window1 : System.Windows.Window
{
    public Window1()
    {
        InitializeComponent();
 
        image1.Source = new BitmapImage(
 
            new Uri(@"C:\Documents and Settings\username\Desktop\Untitled.png"));
    }
 
 
    protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
    {
        base.OnMouseLeftButtonDown(e);
        DragMove();
    }
 
 
 
    protected override void OnMouseRightButtonDown(MouseButtonEventArgs e)
    {
        base.OnMouseRightButtonDown(e);
 
        Close();
    }
 
}
}
 
Technorati Tags: WPF, XAML, dotnet

WPF on steroids – Outlook clone

Two engineer from the Switzerland branch of Microsoft Ronnie Saurenmann and  Ruihua Jin developed an Outlook clone using WPF, XAML, Expression Blend etc.
The online demonstration(XPAB) is available at this url. Check out the 90 pages tutorial about how you can develop an application similar to MS Outlook(be sure to download the project files).

A Spy++ like utility for WPF applications

Take a look at a tool called Snoop that I found useful while developing and debugging WPF Applications.

Features

  • Browse the visual tree of running WPF applications.
  • Inspect properties of elements at runtime.
  • Edit properties of elements at runtime.
  • Inspect RoutedEvents that are occurring, including the elements that handle them.
  • Magnify sections of the User Interface.
  • Locate and debug binding bugs.

 

SpyPlusPlus

 

Documentation
Download

Technorati tags: WPF, XAML, dotnet


Page 1 of 212