"hello world"
article in Tech programming

.NET WPF - so much more than win32

Parts of this content was once part of my .NET programming article, you might also be interested in that...
Download details: .NET Framework 3.5 Service pack 1


WPF - Windows Presentation Foundation

The WPF api surface is bigger than ASP.net and WinForms put together!
WPF Application Quality Guide - WindowsClient.net

Random WPF facts

To use WPF, you'll need to include references to WindowsBase, PresentationCore, PresentationFramework. Also ensure that your main thread is marked STA.
[System::STAThreadAttribute] (on WinMain)
If you don't have a WinMain to attribute set "/CLRTHREADATTRIBUTE:STA" in "Configuration Props" -> Linker -> Advanced -> CLR Thread Attribute property.
WPF defines device-independent pixels as 1/96th of an inch. So setting a width or height property to 96 should measure 1 include wide. WPF will use as many physical pixels as are required to fill 1 inch. Very nice.


Apps using WPF

Everyone mentions vs2010 as being the primary example.
Wiki Pages - wittytwitter - Project Hosting on Google Code


TimL on C#.NET: WPF Frame, Content and ContentRendered


Custom ListBox Layout in WPF - CodeProject
Writing a Screen Saver in WPF « Sean’s Stuff
WPF and Win32 Interoperation Overview
Mike Swanson's Blog : Windows Presentation Foundation Tools and Controls
Tim Sneath : Windows Presentation Foundation Blogs
CodeProject: Windows Presentation Foundation
IRhetoric - Karsten Januszewski : My Five Day Course For Hitting the WPF Curve/Cliff
MSDN: Windows Presentation Foundation
The Code Project - The WPF Thought Process
WPF Learning Experience
WindowsClient.net
ContentPresenter.com - WPF Video Tutorials from Lee Brimelow
thirteen23 :: experiences :: wpf design and development
Snoop - a Spy++ like utility for WPF applications, but cooler.

Performance and WPF

What's New for Performance Profiling Tools for WPF - WindowsClient.net - talks about new WpfPerf performance tools in Microsoft Windows SDK v7.0.
A Critical Deep Dive into the WPF Rendering System « Jer's Hacks


online wpf books

WPF Recipes- scribd.com seems to have the whole wpf recipes book up there. I like the book's format.


Random cool wpf template/style/font stuff

Martin Bennedik: WPF: A fast font drop down list - two ways of doing a font combobox dropdown.
Beatriz Costa » The power of Styles and Templates in WPF
CoDe Magazine - Article: WPF Meets the iPhone - styling an iphone clone.
Dr. WPF > ItemsControl: 'L' is for Lookless (a.k.a., "Styles, Templates, and Triggers... Oh My!")
Jer's One Stop Shop > Home - Glass Behavior for WPF
FullScreenBehavior makes full-screen apps in WPF easy


3d and animation

CodeProject: WPF 3D : Part 1 of n.
WPF3D Team Blog : Subclassing UIElement3D
brains-N-brawn.com / wpfAugReal - Augmented Reality with Windows Presentation Foundation.
A nice paper on animation and doing interpolation.
Foundations: Extending the WPF Animation Classes
Introduction to WPF Animations
More WPF Animations
3D Programming for Windows by Charles Petzold
3D Physics XBAP « Chris Cavanagh’s Blog
Playing Storyboards on DataTriggers to animate a Path | Samuel Moura's DevUX


Hmmm cool.

Petzold Book Blog - Lines with Arrows - talks about Petzold.Media3D which includes arrow primitives which are defined in XAML and support animation.
CodeProject: Perceptor: An artificially intelligent guided navigation system for WPF.



WPF games

Mike Taulty's Blog : WPF: Pong - pong in wpf, but also includes silverlight in his other posts...
CodeProject: WPF : The Classic Snakes WPF'ed.
CodeProject: Newton Game Dynamics Extensions for the WPF - The Moon Lander Game.


Even a chimp can write code: More on resource loading in WPF: Ashish Shetty's weblog - talks a bit about pack uris.


WPF controls

AvalonDock - Home - visual studio like docking features for wpf. (New BSD)
Sofa, a WPF docking library for composite applications - Sofa, a WPF framework for AvalonDock based composite application.
FluidKit - Home - a lot of cool stuff in this, checkout FluidKit - Screenshots.
hardcodet.net » WPF NotifyIcon
Auto Complete for Textboxes in WPF « Ioan Lazarciuc’s Weblog
Thriple - library of 3D controls and panels, for use in WPF applications.


Formatting

Data See, Data Do : Trying out Binding.StringFormat
Lester's WPF blog : WPF 3.5 SP1 feature: StringFormat


Debugging WPF

Data See, Data Do : Trace sources in WPF
How to debug binding problems - Windows Live


Linq and continuous linq

Bindable LINQ - Home - is a set of extensions to LINQ that add data binding and change propagation capabilities to standard LINQ queries.
Paul Stovell says… - Bindable LINQ: Threading
Continuous LINQ - Home


IanG on Tap: Creating Office-Style Textual Separators in WPF with Grouped Menus - very nice article with groupings inside menus.
Bea Stollnitz » How do I insert Separator objects in a data bound MenuItem?
Bea Stollnitz » How do I sort groups of data items?


drag and drop in wpf

Marcelo's WebLog : Basics of data-bound drag-drop in WPF


Parts and states with VisualStateManager

Parts & States Model with VisualStateManager (Part 1 of 4)
Parts & States Model with VisualStateManager (Part 2 of 4)
Parts & States Model with VisualStateManager (Part 3 of 4)
Parts & States Model with VisualStateManager (Part 4 of 4)


WPF CAL CAG - Prism

prism - modularity and ui composition (composite application guidance)
In CAB, you had to take everything....and it was mostly based on inheritance.
In prism, it is supposed to be lightweight, using composition over inheritance.
In prism, the container can be anything you want.
Services are how you do things, and services are found through the container.
Services are really just interfaces..really.
Breaks screens up into regions.
Containers - dep. injection. container - ioc - inversion of control
Containers are like factories, in that types get registered in the container based on interfaces.
Containers help with maintainable and testable....by loosing the deps between objects.
Modules are classes that implement the IModule.
Use bootstraper, create module, in module grab region manager, views go in the regions.
Event aggregation, allows the modules to talk to one another without direct deps.
Composite Application Guidance for WPF
David Hill's WebLog : Prism Quick Start Kit
My Technobabble : WPF Composite Client, it's coming!
SlickThought.Net - WPF Composite App
Composite Application Guidance for WPF
Prism Tutorials Samples and Examples - from pnpguidance.net
Download details: Composite Application Guidance for WPF June 2008
patterns & practices: Composite WPF and Silverlight - Release: Composite Application Guidance for WPF 2008
Erwin van der Valk's blog: Practicing patterns : how to build an outlook style application with prism v2 – Part 2
Telerik Sales Dashboard for Silverlight & WPF - Silverlight Controls, WPF Controls, code reuse - telerik prism sample with wpf and silverlight shared codebase.


error MC3074: The tag 'TaskbarNotifierBase' does not exist in XML namespace 'clr-namespace:YourNamespace;assembly='.

Then I found, XAML Namespaces and Namespace Mapping, which says 'Custom classes cannot be used as the root element of a page if defined in the same assembly.'
Hmm, I wonder why this requirement exists?!


WPF controls

Odyssey WPF Controls - Home - includes OutlookBar, ExplorerBar, BreadcrumbBar, and RibbonBar
WPF Property Grid - Home


WPF Model-View-ViewModel (MVVM)

WPF Onyx - Home - Onyx provides a framework that aids in the creation of WPF applications that follow the Model-View-ViewModel design pattern.
CodeProject: WPF : FlipTile 3D. - example of wpf Oynx.
Simple Framework for MVVM - MVVM related framework for Silverlight (and probably works in WPF) for slow duck tape programmers like my self. (MVVM for Tarded Folks Like Me)
Windows Presentation Foundation (WPF) - Home
GalaSoft - MVVM Light Toolkit
Windows Presentation Foundation (WPF) - The Model-View-ViewModel toolkit is intended to introduce the Model-View-ViewModel design pattern for building WPF applications to the broad WPF developer community.
Introducing MicroModels - the smallest ViewModels for WPF - MicroModels is inspired by Fluent NHibernate and uses TypeDescriptors to dynamically define properties, collections and commands.
MVVM Foundation


wpftoolkit datagrid

Show me the detail - Rudi Grobler - info on RowDetails.
Vincent Sibal's Blog : WPF DataGrid – Dynamically updating DataGridComboBoxColumn
Jaime Rodriguez : Forwarding the DataGrid’s DataContext to its’ columns..
Vincent Sibal's Blog : WPF DataGrid - DataGridComboBoxColumn v1 Intro
WPF Toolkit DataGrid, Part III – Playing with Columns and Cells | Samuel Moura's DevUX
Vincent Sibal's Blog : Launching a custom Dialog to edit items in a DataGrid (with MVVM)
Vincent Sibal's Blog : 5 More Random Gotchas with the WPF DataGrid


ObjectDataProvider

Telerik Blogs > How To: WPF declarative binding to LINQ to SQL using ObjectDataProvider
Bea Stollnitz » Why should I use ObjectDataProvider?
Kirk Evans Blog : WPF and DataBinding


DataTemplates in WPF

WPF Data Templates and the Composite Pattern - Essential WPF
CodeProject: Displaying a Data Matrix in WPF. - Reviews a matrix control that can be data bound and visually styled with ease.


Cool WPF examples

CodeProject: Windows 7 / VS2010 demo app. - Using Windows7 / VS2010 and some of the new bits such as TaskBar/JumpList, Drag & Drop, and MEF.


Setting the WPF webbrowser silent to hide javascript debug error dialogs

There isn't a way to directly tell the new WPF browser control to silence javascript debug errors. However, you can do a little work to get the COM interface to do all the things you wanted to do...like make the browser not pop ugly input grabbing dialogs....
// add ref. "Microsoft Internet Controls" - SHDocVw for browser types...
using mshtml;
using System.Runtime.InteropServices;

[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("6d5140c1-7436-11ce-8034-00aa006009fa")]
internal interface IServiceProvider
{
    [return: MarshalAs(UnmanagedType.IUnknown)]
    object QueryService(ref Guid guidService, ref Guid riid);
}

static readonly Guid SID_SWebBrowserApp = new Guid("0002DF05-0000-0000-C000-000000000046");

// Example usage would be after you have a valid document...
// browser.Navigate(new Uri("about:blank", UriKind.RelativeOrAbsolute));
// MakeComBrowserSilent();
private void MakeComBrowserSilent()
{
    Guid serviceGuid = SID_SWebBrowserApp;
    Guid iid = typeof(SHDocVw.IWebBrowser2).GUID;
    IServiceProvider serviceProvider = (IServiceProvider)browser.Document;
    if (serviceProvider != null)
    {
        SHDocVw.IWebBrowser2 comBrowser = (SHDocVw.IWebBrowser2)serviceProvider.QueryService(ref serviceGuid, ref iid);
        if (comBrowser != null)
        {
            comBrowser.Silent = true;

            // Additional code for setting browser options, left here for grins.
            //IOleObject obj = (IOleObject)comBrowser;
            //if (obj != null)
            //{
            //    boptions.SetBrowser(comBrowser);
            //    obj.SetClientSite(boptions);
            //}
            //IOleControl objc = (IOleControl)comBrowser;
            //if (objc != null)
            //    objc.OnAmbientPropertyChange(-5512);
        }
    }
}



WPF animated gif

WPF does not handle animated gif out of the box... here are some articles that do it.
GIF animation in WPF - CodeProject
Another approach to animated GIF in WPF, with transparency - CodeProject
My animated .gif control for WPF - Pragmatic TSQL Programmer
Animated GIF Support Behavior « Elad’s WPF Blog - WPF behavior using WIC.
System.Windows.Media.Imaging and GifBitmapDecoder with animated gif transparency
How to use an animated gif? - another forum post...lots of people still use gif...


Flash and WPF

Infosys | Microsoft: Hosting Flash movie in a WPF project


WPF Navigation

Magellan - WPF Navigation Framework using the MVC Pattern - * Model-View-Controller framework, * Blend behaviors and Commands to make navigation easy, * Transitions between pages, * Action filters for cross-cutting concerns such as authorization and redirection, * Integration with Composite WPF
Magellan Quickstart - very straight forward with single test.


“Validatexaml” task failed unexpectedly.

SmallWorkarounds: Error 1 The “Validatexaml” task failed unexpectedly.System.IO.FileLoadException.Could not load file or assembly. - did you know there was actually a "block" flag on dlls downloaded from the internet? To unblock, goto Properties on the file, in General there is an "Unblock"


multithreaded ui in wpf

ReactiveUI - Use the Reactive Extensions for .NET along with Silverlight, WPF, or Windows Phone 7 to create elegant, testable User Interfaces.
Multithreaded UI: HostVisual - Presentation Source - Site Home - MSDN Blogs
Quantum Bit Designs » Blog Archive » Stop Polluting the UI Thread – Use a DelegateMarshaler
Quantum Bit Designs » Blog Archive » WPF Cross-Thread Collection Binding – Part 4 – The Grand Solution


Hosting WPF UI cross-thread and cross-process - Diaries of a Software Plumber - Site Home - MSDN Blogs
Caliburn.Micro · Xaml made easy
Created: 2009-01-09 14:33:21 Modified: 2014-06-03 03:37:13
/root sections/
>peach custard pie
>linux
>windows
>programming
>random tech
>science
>research


moon and stars



My brain

Visible Dave Project


x days to Christmas.
x days to a new year.
Happy Holidays!