Welcome to Windows Presentation Foundation (WPF)
Top Tasks :

WPF Community Bloggers

Tuesday, May 06, 2008 - Posts

  • Attached Properties for Max Column Width

    Laurent Bugnion (a fellow WPF Disciple ) just wrote a post showing one way to add MaxWidth capabilities to the WPF GridView. William Kempf (another disciple whom I had the pleasure of meeting when I gave my presentation at Indy Code Camp ), suggested that Laurent use an attached property to allow the feature to be XAMLized. I thought it would be a good idea. So I fired up VS and wrote a little bit of code. If you've read my posts on using the remora pattern then you know the gist of the setup (if not go see them here ). Laurent jumped through a few hoops to hook into the drag event of the GridViewColumnHeader resize thumb control. I found out that GridViewColumn implements INotifyPropertyChanged so on a whim decided to check if I can catch a Property changed event when the Width is changed. Lo and behold I could. So I checked if I could do a poor man's CoerceValue and surely enough I was able to do that as well. I couldn't think of a better place to put it, so I checked the code into the Read More...
  • WPF: ListView/GridView minimum and maximum width for a column

    A WPF ListView is a possible replacement for a datagrid, when it doesn't have to support advanced features like grouping or filtering of rows. If you use a ListView in your WPF application, and set the "View" property of this ListView to be a GridView. A ListView/GridView even supports features like reordering and resizing columns. Unfortunately, it is not possible to define a minimum or maximum width for the columns. Fortunately, it is not really to do this in the code behind. Let's see how. First we need to understand how exactly the resizing of a GridView column works. When a column can be resized, a narrow vertical line appears on the right side of the column. Passing the mouse over this line turns the cursor into a "resize" cursor. To find out what exactly this line is made of, we can use a tool like Snoop , or Mole . These tools display the inner structure of a WPF UI, also known as the Visual Tree. For example, in Mole, we can navigate down to our ListView and display the header Read More...
  • NIN: The Slip

    The new Nine Inch Nails album, titled The Slip , was just released. The album is completely free to download. I've just started listening so I haven't formed an opinion yet, but the first two tracks are straight up NIN recipe and I'm liking it so far. Oh and, unlike Ghosts I-IV (which I also love), this album includes vocals. Read More...
  • Zune now offers TV shows

    Alright, finally! A step in the video direction for Zune. Starting today Zune now offers a plethora of TV shows for download from the Zune Marketplace. Microsoft really should have been out of the gate way before Apple's ITunes with this stuff because they already had all the content for the 360. These are pretty much the same shows you can get on XBox 360, though not all of them (yet?). My biggest question at this point is: If I bought an episode on 360, do I get it for my Zune? Vice versa? If not, why not (other than greed)? It's the same content in a different format. Read More...
  • [Silverlight] Un petit test de débugging Silverlight vous tente ?

    Si la réponse à cette question est oui, alors je ne peux que vous conseiller d'aller sur le blog de Jesse Liberty. En effet, il a posté un petit concours pour tout ceux qui veulent tester leur compétences en terme de débugging. Comme vous le verrez, ... Read More...

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