Welcome to Windows Presentation Foundation (WPF)
Top Tasks :

WPF Community Bloggers

Browse by Tags

All Tags » None   (RSS)
Sorry, but there are no more tags available to filter with.

  • Fixing WPF Command Routing

    Bill Kempf , a fellow WPF Disciple , was lamenting the fact that by default a CommandBinding can only refer to a handler defined in the code behind of the Window/Page/UserControl in which it's defined. He wished that a syntax similar to the following was possible < Window > < Window.CommandBindings > < CommandBinding Command ="foo:MyCommands.FooCommand" Executed ="{Event Target={StaticResource MyPresenter}, Handler=OnFooCommand}" /> </ Window.CommandBindings > </ Window > I took that scenario as my starting point. The first issue I saw was that I needed a markup extension that let's you specify a Target Object and the name of a handler on that Target returning a ExecutedRoutedEventHandler. So I made one. The Markup Extension exposes two properties: Target (of type object) and Handler of Type String. The ProvideValue override (shown below) uses reflection to get a handle on the function and creates a lambda that invokes it for the result. Read More...
  • Generic Extension Methods

    I've discovered that if an extension method is generic and the generic type is used as the "this" parameter, you do not have to write out the generic discriminator. The compiler is smart enough to infer it for you. For example, the range validation function I shared a few weeks ago can be called like so: int myInt=5; myInt.ValidateRange(2,20); Jeff would be happy. Read More...
  • Frameworks! Frameworks! Frameworks!

    If I haven't blogged about t before, I meant to but have been extremely busy. The first release of Prism or Composite App Guidance for WPF is available. Oh wait...I've blogged about it already (Did I mention how much I love Live Writer?). If you're looking at WPF for enterprise "Line of Business" applications, you should really look at it, not just for the framework but for the guidance assets themselves. I participated in the advisory board for the guidance and had a blast giving feedback to the PnP team and seeing that feedback integrated into the package. I even got my name on the MSDN page for the package It's the little things that make me smile :P Anyway, this post isn't about me. It's about some cool announcements coming from Microsoft. (Slow down guys or there won't be much left to announce by the time PDC arrives.) First up is the Managed Extensibility Framework or MEF for short. The short explanation for it is native Dependency Injection in the .NET Framework. There Read More...
  • Shadow Copies Saved My Live

    I'm a control freak...when I delete something, I want it gone like now. I don't want it to go to a recycle bin so I can retrieve it later. Get off my computer...NOW. So when I delete a file, I always use Shift+Delete to bypass the "send to recycle bin" phase. That has bitten me in the butt a few times in the past. Thanks to Vista's shadow copy service, I have been able to recover from over zealous deletion twice now. Once with a source tree with changes I hadn't committed to source control yet. And just now with the entire contents of my downloads folder. I may sound like one of those commercials that you see where people give "real" testimonials about how good a product is. But believe me, if you've ever wished you could undo a delete, shadow copies are the next best thing to having a rewind button for life. Read More...
  • Returning to the Motherland

    As I mentioned before (I think), my focus on UI development has been a recent phenomenon in my career. Prior to that, the majority of my efforts has been in back-end frameworks and integration. Even looking at what I've done in the WPF arena, most of my attention has been on creating utilities that do a lot of behind the scenes work: MVPoo, Commands, Attached Properties, and all that fun stuff. I guess it's only natural that I land back in the arena of back-end and framework development. I've got a few interesting classes and utilities to share from my recent excursions in the area. Hopefully, someone will find these useful. First up are a couple of extension methods for range validation. Right now, they only work on IComparable<T> (which all value types derive from). Being extension methods, they only work with .NET 3.5 but it is an easy exercise to change them to standard static utility methods. The interesting bit I discovered writing these is that extension methods can be Generic. Read More...
  • The Best Part of Blogging

    You get to look back at your old posts in astonishment at how far you've come from back then. Take Paul Stovell for example. In March of 2006 he gave a presentation called "Why I hate Data Binding" In July of 2007 he gave a presentation called "Binding Oriented Programming" Talk about an about face! I don't have any drastic examples like that in my blog. But it's still fun to read through some of my old posts. Read More...
  • Mudanza de Blog

    Simplemente eso, me mudo de blog a www.damiangalletini.com.ar Los espero por alla. Saludos! Read More...
  • You ARE in the Software Business

    I've spoken a lot about the potential that Team Foundation Server provides as a framework for creating very powerful software development process tools. I've also spoken a lot about supporting your software development department with a dedicated development team. These two ideas go hand in hand. Let me expand on that here. When a company wants to support their business processes with software, they have two choices: buy a product off the shelf; or build a custom software solution. Actually, there are three choices, but the third is a hybrid of the first two: customize an off the shelf product. The software your company creates for the sprocket order fulfillment system is an electronic manifestation of your company's business processes. You have significant amounts of money set aside every year to improve that software so that it better captures your business processes. You know that COTS software won't be an exact fit for what you are doing, your processes are what give you an edge over Read More...
  • Prueba

    Posteando desde Word. Read More...
  • Dynamic Dependency Properties

    First things first. I'd like to wish everyone a Happy New Year. Here's hoping that 2008 brings with it happiness, excitement, joy, and wonder! Recently I came across a blog post that discussed the use of Custom Type Descriptors to dynamically add properties to an object. We currently use this technique in our application, however there is a lot of hocus pocus going on behind the scenes that makes working with that particular piece of code precarious. I was curious if it would be possible to dynamically declare dependency properties and bind to them using the WPF Binding system. The short answer is yes. The long answer is HELL YES! Believe me using dependency properties to dynamically add properties to your objects is orders of magnitude easier than using custom type descriptors. Something tells me that DPs are just an abstraction of custom type descriptors. Does that make me lazy? Probably. Then again, the less code I have to write to accomplish a task, the less likely I am to introduce Read More...
  • Snoop, Woodstock, and Mole

    Once again, I've been assuming that everyone in the WPF community already knows what I know. Funny thing is, I haven't seen heavy coverage for Woodstock and Mole. Put simply, if you are developing in WPF, you owe it yourself to go right now and download Mole . For a little background, Mole is the successor of Woodstock, which is the spiritual successor to Snoop. For an understanding of Snoop, think UISpy or Spy++ for WPF. Now take Snoop and turn it into a Visual Studio debugger visualizer so you can drill into your visual tree on a breakpoint, and you have Woodstock. Now take Woodstock and put it on steroids, and you have Mole. Like I said, you owe it to yourself to get it NOW. Read More...
  • Acropolis No More Soon to Be in .NET Framework Core

    So my powers of observation are proven right again...I'm not sure if I actually blogged it, but I did mention to a few people who can verify that I believed "Acropolis" would become a part of .NET Framework proper. After a bit of silence, Microsoft has finally announced the plans for "Acropolis" . Basically, a future version of the .NET framework will indeed include a smart client equivalent of the ASP.NET MVC framework. Once again, I implore the kind people of Microsoft to consider providing a unified framework for application composition. In other great news, MSFT will be enhancing the existing PNP Guidance to fill the void between now and the release of "Acropolis" (which will have no further preview releases) within a future version of the .NET Framework (fingers crossed hoping that it makes 4.0). Read More...
  • The Delegating Command

    The RoutedCommand doesn't quite make sense to me in the M-V-VM pattern. Why go through the effort of creating command bindings when you are holding an instance of the Command within your controller (or ViewModel). Just trust me when I say it's convoluted. At the other extreme, you would have to create a new class for each and every Command that your application provides. While there is a benefit to this scenario in some cases, in most instances it's overkill. A happy medium is having a class that implements ICommand and exposes events for CanExecute and Execute. Hence I give you the DelegatingCommand. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Input; namespace YourNamespaceHere { /// <summary> /// Delegate for adding logic for determining if a /// <see cref="DelegatingCommand"/> can be executed /// </summary> /// <param name="parameter"> /// The parameter being passed to the command Read More...
  • Call To Arms

    (Cross posted on the front page of the WPF Toolbelt) I had some lofty dreams when I first started this project (during beta 2 of .NET Framework 3.0. Now the 3.5 Framework is in Beta 2 and this project has stagnated because I've lacked the bandwidth to properly contribute to it. I've had some ideas for how to get things rolling again, but I just haven't had the time to properly dedicate to this. There are commercial libraries that address the same space as the toolbelt. And I can't hope to match a team of paid developers as a single developer working in my spare time. I've had the occassional volunteer join me, however because I can't provide the bandwidth to properly lead this effort, they tend to lose steam and move on to other things. I've seen a lot of visits to the project and a lot of downloads but very little feedback. Hopefully, the project has helped someone learn more about WPF. There are some nice examples of custom control creation in there...especially how to do lookless controls. Read More...
  • Slightly Dorky Nerd King

    I just got my nerd certification. I added my South Park avatar to seal the deal. I appeared to have failed my dumb/dork/awkward section...not by much though. BTW one disturbing statistic from the site is that 58% of the test takers would pick the Internet over sex if forced to choose one sacrificing the other permanently. Read More...
More Posts Next page »

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us