Threading Model Threading Model Consider the following example: This simple application counts upwards from three, searching for prime numbers. When the user clicks the Start button, the search begins. When the program finds a prime, it updates the user interface with its discovery.
AttachedCommandBehavior V2 aka ACB « C# Disciples AttachedCommandBehavior V2 aka ACB « C# Disciples YOUAfter publishing my AttachedCommandBehavior library, (you can read about this here), some WPF Disciples recommended some new features to make the library cover more use cases. Thanks William Kempf your input was amazing! I added 2 new features - Support for Collection of binding to commands- Support for Light weight Commands or as I call them Action Support for Collection of binding to commands
The Windows SDK includes a suite of performance profiling tools for Windows Presentation Foundation (WPF) applications called the WPF Performance Suite. The WPF Performance Suite enables you to analyze the run-time behavior of your WPF applications and determine performance optimizations that you can apply. The WPF Performance Suite includes performance profiling tools called Perforator and Visual Profiler. This topic describes how to install and use the Perforator and Visual Profiler tools in the WPF Performance Suite. This topic contains the following sections: The following steps describe how to install the WPF Performance Suite. WPF Performance Suite WPF Performance Suite
Windows Presentation Foundation (WPF)
More than once, I’ve found myself wanting to be able to demonstrate the range of controls that are available for Silverlight and WPF and, today, I ended up in that same place and decided to do something about it. I built a very, very simple WPF application. Screenshot is below and you can install the application via ClickOnce by clicking on the picture below (note you'll need .NET Framework V3.5 Sp1 as I don't install it for you here); Silverlight & WPF Control Browser Silverlight & WPF Control Browser
Bea Stollnitz » WPF’s CollectionViewSource Bea Stollnitz » WPF’s CollectionViewSource Oct 31, 2009 CollectionViewSource has existed for a long time in WPF and was recently introduced in Silverlight 3. My next post will cover CollectionViewSource in the context of Silverlight. But before covering that topic, I’ve decided to provide some background about why we introduced this class in WPF. Views in WPF When a user binds a WPF property to a collection of data, WPF automatically creates a view to wrap the collection, and binds the property to the view, not the raw collection.
Search and Highlight Text in an Arbitrary Visual Tree A while back I answered this question on stackoverflow and have been meaning to elaborate on my answer ever since with a more comprehensive blog post. The question is about how to highlight some text in the UI when the user enters some search text. I thought I’d extend the concept into a clean, generic solution as far as I could and share it here. My requirements are pretty straightforward: Search and Highlight Text in an Arbitrary Visual Tree
MVVM Foundation Project DescriptionMVVM Foundation is a library of classes that are very useful when building applications based on the Model-View-ViewModel philosophy. The library is small and concentrated on providing only the most indispensable tools needed by most MVVM application developers. To download the latest version of MVVM Foundation, go to the Source Code tab on this page. Model-View-ViewModel is a way of creating client applications that leverages core features of the WPF platform, allows for simple unit testing of application functionality, and helps developers and designers work together with less technical difficulties. The classes in the MVVM Foundation are time-tested tools in the toolbox of many WPF developers around the world. Now they all live in one convenient project...MvvmFoundation.Wpf. MVVM Foundation
Using Git with Visual Studio Using Git with Visual Studio I find that git, working on whole trees as it does, benefits less from ide integration than source control tools that are either file based or follow a checkout-edit-commit pattern. Of course there are instances when it can be nice to click on a button to do some history examination but I don't miss that very much. The real must-do is to get your .gitignore file full of the things that shouldn't be in a shared repository. Mine generally contain (amongst other stuff) the following:
WPF 4.0 Text Stack Improvements - WPF Text Blog Please note that the screenshots in this post are not displaying correctly. To view them in their full fidelity, right click on them and save them as a .PNGs. Then use your image viewing program of choice. WPF 4.0 Text Stack Improvements - WPF Text Blog
Word to XAML Converter Project DescriptionA Word 2010 Add-in that converts the Office Open XML (WordprocessingML) to XAML:For WPF, the document is converted into a FlowDocument element.For Silverlight 4, the document is converted into either a StackPanel element containing TextBlock elements or a RichTextBox.Add http://xmldocs.net/Word2Xaml to your Trusted Sites List in Internet Explorer.Install the WordToXaml Add-in from http://xmldocs.net/Word2Xaml/setup.exeStart Word; you should see a XAML Tab on the Ribbon InterfaceOpen any document in Word 2010Switch to the XAML Tab and select the appropriate optionsYou can preview the WPF or Silverlight document directly from Word by pressing the Preview button Previewing the Silverlight XAML opens the XAML in a test Silverlight page running on the file system (You'll need to approve the Silverlight plug-in here). You can then copy the XAML directly from there.From the File menu select Save & Send...XAML Document to save the XAML document to a file Word to XAML Converter
Overlaying Controls in WPF with Adorners at Big Nick’s Blog One of the common things that comes up on multiple projects using WPF is the ability to overlay the screen or a certain portion of it. Either to create a richer modal-type experience than a message box provides or to block access to a certain portion of the screen while an asynchronous or long running operation is happening. There are a number of ways to do this but the one I’ve settled on after tackling it on a few projects is an adorner that automatically overlays and control with any content you want. Other options include using the Popup control, which is problematic because popups are not part of the normal visual layout. They are always on top of all other content and don’t move when you resize or move the window, at least not automatically. Another way you can do it is put everything inside a grid, and add the content you want to overlay with at the end of the Grid’s content with no Row or Column specification.
Resizer: a WPF Control Recently I needed to allow users to resize a WPF Popup. After implementing a non-generic solution, I decided to attempt to turn the concept into a generic WPF control. The Resizer control is a specialised ContentControl that can be used as follows: <kb:Resizer xmlns:kb="http://kent.boogaart/controls"> Content </kb:Resizer> The Resizer control adds resizing behaviour to the content you place within it. The default template uses a ResizeGrip and allows the user to drag the grip in order to resize the content.
Drag and Drop