One of the great parts about commands in WPF is that they know if they can currently execute or not. When they cannot execute, the control(s) that are set to execute the command will be disabled automatically. For example, if your application has no changed data, the Save toolbar button will automatically be disabled, assuming its Command property is set to the Save command. WPF will automatically ask all of the commands being used in your UI if they can execute. Allowing CommandManager to query your ICommand objects Allowing CommandManager to query your ICommand objects
Refresh / Update WPF controls Refresh / Update WPF controls Sometime in the past, a friend asked me how to update a control to show status while his code is doing a loop of stuff. Essentially changing the text of a label (or sophisticatedly we can say a text-based progress bar). In my past coding with MFC and WinForms, it's fairly easy enough, you just invalidate and do an update (Invalidate / UpdateWindow in MFC or Invalidate / Update in WinForms).
WPFDeveloperTools - Download: WPFDeveloperTools - First Public Release
I've been playing around with WPF animation, and ended up wanting to take a snapshot of an animation at a specific place. Specifically, I have a canvas that has some pictures on it that are moving, and I want to be able to save a bitmap of what it looks like at a specific time. Getting the bitmap is pretty easy, using a RenderTargetBitmap and a VisualBrush. private BitmapSource CaptureScreen(Visual target){ Taking snapshots of WPF animation - Eric Gunnerson's Compendium Taking snapshots of WPF animation - Eric Gunnerson's Compendium
Download source - 3.37 Kb etc) --> Introduction Over the past few months I have been creating a variety of WebControls some of which have needed access to a DataSource such as a DataSet in order to work properly. Adding a DataSource to your WebControl is relatively easy however the tricky part is when you need to interact with that property in the Properties window e.g. in the same manner as you would for a DropDownList control etc. Now if you are lucky and you get the query right in MSDN you will come across the following article Implementing a Web Forms Data-Bound Control Designer. Data Binding in WebControls Data Binding in WebControls
Visual Studio WPF Designer Forum Visual Studio WPF Designer Forum The Visual Studio WPF and Silverlight Designer Team is delighted to inform you that Visual Studio 2010 RTM is now available! Take a look at What's New for WPF and Silverlight Developers in Visual Studio 2010 ?
WPF LOB Feedback
Building a Perfect WPF Developer Workstation - Tim Sneath Wonderful list of tools needed for any WPF developer. Although, I'd suggest other fonts as well - I find that switching between proggy square, inconsolata, consolas, etc.. gives me a little "boost" every time I switch. And, since you have the words "developer workstation" right in the description (and correct I may add), any chance of nudging the MSDN bean counters and saying "hey, Blend is indeed a developer tool"? Not having it included in MSDN is really, really frustrating to us that already accepted a nice big slap already with the different editions. If so, thanks! Building a Perfect WPF Developer Workstation - Tim Sneath
Hosting a WPF Control in a Windows Forms Application - MHender Rambles On (Blogging Tunes: Screaming Headless Torsos - "1995") We've talked about hosting Windows Forms controls in WPF applications, but what about the other way? You may very well want to just keep your existing Windows Forms application and "sprinkle" in some WPF sweetness in strategic places. That means you will need some means to be able to place WPF controls side-by-side with Windows Forms controls. Hosting a WPF Control in a Windows Forms Application - MHender Rambles On
Composite WPF Contrib is a community-developed library of extensions to the patterns & practices Composite WPF project. If you are building custom tools and extensions and want to share them then Composite WPF Contrib will get it out to the masses.If you've got a great idea for new extensions Composite WPF contrib is the place to find developers ready, willing, and able to make it happen.If you use Composite WPF within your org, then Composite WPF Contrib is the place to find tools and extensions to add to your arsenal.If you want to connect with others who are pushing the bar on Prism development, then Prism Contrib is the place to be. Prism contrib is about YOU. With your help we can make it a vibrant resource for WPF Composite developers world-wide. News (2008-10-26) New ExtensionsWindowRegionAdapter. Patterns & Practices: Composite WPF Contrib Patterns & Practices: Composite WPF Contrib
Download source code - 65.44 KB Contents Introduction A DataGrid is a user interface component for displaying tabular data to the user, typically providing sorting and editing functionality, among others. DataGrids have been the work-horse of various frameworks such as ASP.NET (GridView) and Windows Forms (DataGridView). WPF DataGrid Practical Examples WPF DataGrid Practical Examples
ChartingStylingGuide.pdf (application/pdf Object)
Styling Microsoft’s WPF datagrid - Jaime Rodriguez Microsoft’s WPF datagrid has a lot of properties and styles you can tweak to get it looking right (if you are a designer). Below, find my cheat sheet to styling the grid. It is not 100% comprehensive but it gets you far and has a few very useful tips & gotchas. At the highest level in the DataGrid , you can change the look & feel by setting some of these: Here, you can see a visual representation for a few of these properties (the visual is not all inclusive); this will give you an idea of what this article will cover. Backgrounds: The interesting part are the relationships amongst the backgrounds: Styling Microsoft’s WPF datagrid - Jaime Rodriguez
Introduction This article is about developing a XAML only WPF CheckListBox and ListBox with Selection Indicator control styles, and taking the same requirements and building a custom control that takes a very different approach to the problem. This article is about taking a concept and running with it. It's about this developer's desire to recreate a complex control using only XAML markup. We will explore the XAML only approach, then toss everything into a blender, and pour out two WPF Custom Controls using VB.NET. This article and its controls were inspired by Josh Smith's awesome article, The WPF Thought Process. A WPF Problem Solved Two Very Different Ways - Using XAML Only - Using a Custom Control
WPF Binding Cheat Sheet
WPF Binding Cheat Sheet « Method ~ of ~ Tried
WMF2WPF Library and command line tool Download WMF2WPF here See Help for instructions Paint.NET file type plugin Download WMFFileType here See Help for installation instructions Download
WPF Enum List Converter Introduction This article demonstrates how to bind a C# enum definition to a WPF ComboBox, which is not as simple as it first seems. The solution was extracted from a real-world commercial application. Background Enum definitions are great for defining small fixed lists of options for a property. They are easy to define in code, and are strongly typed, so they help produce robust code.
Drag & drop in WPF part2 ... - Jaime Rodriguez Last part, we focused on the drag... In this part we will focus on drop (which is relatively straight forward) ... DropTargets must set AllowDrop = true It all begins with a Visual Element setting its AllowDrop to true; this tells the D&D subsystem your control is a drop target ...