Silverlight 2 Binding Modes Diagram
Monday, June 23 2008 - silverlight, xaml, wpf, book - 2 comments
Here’s a tiny little nugget from my upcoming book. There are always concepts that are just natively drilled into me yet they don’t flow smoothly when I try to explain them. For example take the Silverlight 2 binding modes. You have OneTime, OneWay and TwoWay as options. OneWay is the default and many examples of XAML based binding I see of XAML in both Silverlight and WPF omit the Mode property entirely. But OneTime is not always the appropriate option, either. Read only data is better suited for OneWay while editable data is suited well for TwoWay. Data that should only be bound and displayed when the source is first bound is ideal for OneTime.
There are nuisances to the scenarios, too (aren’t there always?). For example, OneWay and TwoWay bindings rely on the INotifyPropertyChanged interface and its PropertyChanged event being raised.
OK, so my point is that sometimes explaining these types of situations is more difficult than just showing them with code. I;ve always been more about show me the code and sprinkle a little bit of explanation around it. To me that is so much easier to comprehend than reading a dozens of pages without code or pictures.
So I came up with a simple diagram for to help myself explain the binding modes a little bit. Its not the only tool I use (I use code samples, other diagrams, and words too) but its one I start with. I figured I would share it for any who might be interested. You can also find a variation of this diagram in my upcoming book Data Access with Silverlight 2 published by O’Reilly (Dec 2008).
Expression Studio 2 Ready For Download
Friday, May 02 2008 - silverlight, xaml, wpf, expression - 9 comments
Expression Studio 2 is out of beta and has been released. I've been using the betas and they have been pretty good, but its nice to finally get my hands on the full release as v2 is much better than v1.
Expression Studio contains the following products:
- Expression Web 2
- Expression Blend 2
- Expression Design 2
- Expression Media 2
- Expression Encoder 2
Clipped from their web site, here is a list of features for Expression Studio 2:
Design for Windows and the Web
Use a full range of new professional design tools to bring your creativity to the world of the .NET framework and Silverlight. Design the next generation of user interfaces for Windows and the Web.
Designer Developer workflow
Combine Expression Studio for designers with Visual Studio for developers for a powerfully integrated solution for designing and coding innovative applications.
Design for Silverlight 1.0
Expression Studio 2 is the essential design resource for Microsoft's newest web technology Silverlight 1.0 - use a combination of Expression Blend 2 and Design 2 to create your Silverlight application and Expression Web 2 to integrate it into your website.
Standards Based design with Expression Web 2
Design for today's web standards with Expression Web 2, built to translate your visual layouts into fully compliant pages using your choice of versions of XHTML, CSS, XML and XSLT.
Harness the power of ASP.NET and PHP with Expression Web 2
Expression Web 2 is the first web design tool to offer deep support for both ASP.NET 3.5 and PHP which allows designers to collaborate with developers on web projects to make compelling sites.
Design UX with Expression Blend 2
Collaborate with developers to produce applications with great user experience that both look great and function well. Design application skins with interactivity and animation without needing to type a line of code.
Design for XAML
Design graphic elements for Blend and Silverlight and export them in XAML format to retain absolute fidelity through the life of the project. Have confidence that your design lives on.
Create Artwork with Expression Design 2
Create artwork for your desktop and web applications using an exciting drawing tool then either export as XAML or slice your images for the Web.
Manage your design assets with Expression Media 2
Keep track of your graphic and video files using Expression Media, a team asset management tool that lets you sort, keyword and find them with unsurpassed ease.
Encode Video for Silverlight with Expression Encoder 2
Prepare your files for delivery with Silverlight using the Expression Encoder to crop and add markers enabling your websites to interact with your video content.
WCF Configuration - Simple Oversight
Monday, April 28 2008 - wcf, mvp, wpf - 1 comments
Last night I had a problem with getting WCF to work with my application. I had a very simple scenario intermixed in a multi-layered application. The error I kept getting was
Could not find default endpoint element that references contract MyServiceHost.IMyService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
I kept looking at the config files using the SvcConfigEditor.exe utility and made sure the client and the server configurations were set up properly and matched each other. I was convinced I had done it right, so I started googling for answers. I was sure it was something simple. Well, it turns out that it was a simple mistake I made. I did not find anything by googling, so I figured I would post this in hopes of helping others and myself in case I do this again someday :)
My application has a UI layer for the views (using WinForms, WPF, etc) and a second project layer for presenters (using the MVP passive view pattern). The presenter project is what communicates with the WCF Service via its host but the app runs from the UI layer. This means that the client config must be accessible from the UI's exe. I had placed the config file in the presenter project because this is where I had set up the service reference to the WCF services. Once I realized that I forgot to copy the config file to the UI project I had a "doh!" moment.
So in short, the problem It turns out my problem was quite simply resolved once I realized I forgot to put my app.config file in the bin folder of my multi layered application's startup project.

Email

