Caleb's profileCaleb's RamblingsBlogLists Tools Help

Blog


    February 02

    WPF Designer Frustrations

    LiveJournal Tags: ,,,

    Lately I have been increasingly frustrated with the designers for WPF.  I would not be at all surprised to find that I would have some of the same frustrations with the Windows forms designer, but some of the frustrations are more WPF specific.  The real problem seems to be that as soon as you do something non trivial the designer will break even though the code runs perfectly fine.  Here are some of the things that are giving me grief at the moment.

    1. I moved a style out of a UserControl into a separate ResourceDictionary that is merged into the Application’s resource dictionary.  The designer can still load the user control, but if I try to load the designer for the Window that uses this UserControl it says it can’t find the style.  If I change this style reference to a DynamicResource reference instead of a StaticResource reference then the Visual Studio designer will load, but not Blend.
    2. I am using an IoC container (Castle Windsor) in some of my domain objects to provide instances of classes which inherit a certain interface.  The view model which I am using instantiates some of these domain objects and BOOM! the designer can’t cope with setting up the IoC container because it can’t find the config file.  If I hard code the location of the config file in (not desirable, but possibly a liveable workaround when I am in design mode) then I get a different error saying that it couldn’t load the Castle assemblies.  I can’t see why this should happen because they required assemblies are added as references in the project.

    The designers are very useful when they are working as they enable you to quickly try out loads of different brushes for styles without having to start the app up each time, but increasingly I find my self fighting with the designer to get it to show me the thing I am interested in so I can work on it.  Maybe I am using the wrong approach to things, but there seems very little documentation of a better way to work with them while actually showing the data you are interested in. 

    What would be truly awesome is if you could attach a designer program to a running application and muck around with the properties of the objects while the application was running.  That way you wouldn’t have the problem of not being able to see the working data from the database or some other datasource.

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://cebla5.spaces.live.com/blog/cns!1B8262ED00250003!202.trak
    Weblogs that reference this entry
    • None