Dan Crevier's Blog

In search of a better name...

Posts
  • Dan Crevier's Blog

    DataModel-View-ViewModel pattern series

    • 29 Comments
    I thought I should add a post with the full list of posts in the D-V-VM pattern. They are: DataModel-View-ViewModel pattern: 1 (overview) DataModel-View-ViewModel pattern: 2 (first implementation of DataModel class) DM-V-VM part 3: A sample DataModel...
  • Dan Crevier's Blog

    Hello Word Outlook Add-In using C#

    • 33 Comments
    One thing I’d like to play with is extending Outlook through add-ins with C#. It’ll be a good opportunity to learn more about .NET development and the Windows tools. Plus, I can “fix” some of the things that annoy me about Outlook...
  • Dan Crevier's Blog

    DataModel-View-ViewModel pattern: 1

    • 7 Comments
    John Gossman has blogged several times about the M-V-VM pattern for developing WPF applications. We've been using a similar pattern on the Max team, with slightly different terminology (DataModel instead of ViewModel). I thought I'd do a series of posts...
  • Dan Crevier's Blog

    Automating/scripting iTunes on Windows

    • 30 Comments
    Apple has posted an SDK for accessing iTunes using COM on Windows (it's funny, I noticed they left .DS_Store files in the zip archive!). It includes sample javascripts for doing things like creating playlists. You can actually write these scripts without...
  • Dan Crevier's Blog

    DataModel-View-ViewModel pattern: 2

    • 13 Comments
    In part 1 , I gave an overview of a pattern we use in the UI development of Max . In this post, I plan to talk about DataModels. In part 1, I wrote: DataModel DataModel is responsible for exposing data in a way that is easily consumable by WPF. All of...
  • Dan Crevier's Blog

    Implementing a virtualized panel in WPF (Avalon)

    • 6 Comments
    Displaying large sets of data can be challenging to do performantly. If you have a scrolling list of data, one technique to improve performance is to only create the UI elements that are visible. This is refered to as UI virtualization (as opposed to...
  • Dan Crevier's Blog

    The difference between <%= and <%# in ASP.NET

    • 3 Comments
    I was a little confused about the difference between <%= expression %> and <%# expression %> in ASP.NET. It seems like both work in a lot of cases, but in other cases, only the # (data binding) version works. So, I decided to dig into it a...
  • Dan Crevier's Blog

    DM-V-VM part 3: A sample DataModel

    • 8 Comments
    In part 2 , I showed a base class for DataModels. In this post, I will describe a sample implementation. For this sample, I'll use a DataModel that represents a stock. The model will be in charge of asynchronously fetching the stock quote and making it...
  • Dan Crevier's Blog

    DM-V-VM part 8: View Models

    • 6 Comments
    Ok, time to wrap this up :-) Now, we'll finally build what I'm calling a view model for managing a portfolio of stocks (building on the StockModel example from previous posts). A view model is a class that will be used as the DataContext for a data...
  • Dan Crevier's Blog

    Implementing a VirtualizingPanel part 2: IItemContainerGenerator

    • 8 Comments
    In part 1 of this series of posts, I gave an overview of how to write a VirtualizingPanel. One of the keys to the implementation is understanding IItemContainerGenerator. I personally found it a bit nonintuitive to begin with. IItemContainerGenerator...
  • Dan Crevier's Blog

    DM-V-VM part 5: Commands

    • 9 Comments
    In the previous posts, I've covered data models and how to make data easily consumable by Avalon. Now, I want to start getting into the view model side of things because I don't think it's clear what I mean by them and I'm working up to an example. I...
  • Dan Crevier's Blog

    My first patent!

    • 8 Comments
    Speaking of auto complete , I got my first patent! It's some email address autocomplete stuff from my MacOE days. You can read it here if you have nothing better to do.
  • Dan Crevier's Blog

    Implementing a VirtualizingPanel part 4: the goods!

    • 11 Comments
    Ok, we finally get to a full implementation with this post. I’ll be showing the implementation of a VirtualizingTilePanel. This is a layout is very similar to the one I used for the layout animation sample . For the sample, I’ve created a small test harness...
  • Dan Crevier's Blog

    DM-V-VM part 7: Encapsulating commands

    • 8 Comments
    In part 5 , I talked about commands and how they are used for behavior. Now, I want to talk about a better way to encapsulate them. First, I'll create a CommandModel class that encapsulates the RoutedCommand and the enabled/execute code. This is all pretty...
  • Dan Crevier's Blog

    DM-V-VM part 4: Unit testing the DataModel

    • 3 Comments
    In part 3 , I showed code for StockModel, a DataModel for stocks. On the Max team, we are big believers in extensive unit testing of our code. It took some time to learn the best way to test some of the WPF related stuff. In this post, I intend to demonstrate...
  • Dan Crevier's Blog

    DM-V-VM part 6: Revisiting the data model

    • 15 Comments
    Sorry it's taking me so long to get the posts out. The series turned out to be a little longer than I anticipated :-) I got a lot of good feedback on the Data Model stuff. First off, I want to mention layering. The DataModel typically is a layer on top...
  • Dan Crevier's Blog

    Attaching behavior to an Avalon element in XAML

    • 5 Comments
    Sometimes you want to attach some behavior to an Avalon element by adding some event handlers, but without subclassing the element. An example of this is my most recent version of the layout animation code. In my original post , I had code in my code...
  • Dan Crevier's Blog

    Console is a nice cmd.exe replacement!

    • 2 Comments
    Long ago I complained about cmd.exe. At the time, I tried out some of the replacements and didn't find anything I liked. But, I just tried out a Console 2.0 beta, and I love it! The way it hosts cmd.exe is necessarily a bit of a hack, but they pull it...
  • Dan Crevier's Blog

    Why doesn't Microsoft Entourage use the Apple Address Book?

    • 32 Comments
    A fairly common question that comes up in mailing lists and other forums is “Why doesn’t Entourage use the Apple address book?” I’ll give you my take on that here. As a disclaimer, I want to make sure it’s clear that this...
  • Dan Crevier's Blog

    Implementing a VirtualizingPanel part 3: MeasureCore

    • 5 Comments
    Now that we understand how IItemContainerGenerator works, I’m going to walk through some of the details of how your virtualizing panel’s MeasureOverride should work. I think the easiest way to see how it all works is to just look at some code. In the...
  • Dan Crevier's Blog

    The difference in wildcard expansion between Windows and unix/Macintosh

    • 3 Comments
    This one took a little getting used to when switching from the Macintosh to Windows. On unix (including Mac OS X shells) wildcard expansion is done by the shell, and then the expanded list of files is passed on to the program being run. On Windows, the...
  • Dan Crevier's Blog

    iTunes, WMP, iPod, iTMS and choice

    • 38 Comments
    There's been lots of discussion following the release of Windows Media Player 10 regarding choice. It's a bit complicated because there are so many axes of choice, and so many things to pivot around. I'll try to summarize some of the issues here. iPod...
  • Dan Crevier's Blog

    Yield and usings - your Dispose may not be called!

    • 10 Comments
    We ran into an interesting bug recently where a resource was being leaked because we weren't disposing of an IDisposable in some cases. Before I go any further I should state that the root bug is that the IDisposable hanging onto the resource should have...
  • Dan Crevier's Blog

    What does runat=&quot;server&quot; do for HTML controls

    • 6 Comments
    One thing I didn't fully understand when I first started using ASP.NET is exactly what runat="server" does. It sounds like some magical thing where code is running on the server for your control and not on the client. In some cases something like that...
  • Dan Crevier's Blog

    Layout to layout animations in WCP (part 2)

    • 7 Comments
    This post continues my series on layout to layout animations in WCP (Avalon). In part 1 , I showed to create a panel that lays out its children in a grid and allows the child size to be controlled with a slider through data binding. In this post, I'll...
Page 1 of 9 (217 items) 12345»