About the author

Brian Keating is a developer addicted to Microsoft Technologies.

Month List

RecentComments

Comment RSS

Silverlight Fluid Motion

clock September 19, 2011 22:05 by author Brian Keating |

 

You know what?
I love Silverlight!

The only reason I don’t spend more time in it is the ASP is more suited to non enterprise applications.
However tonight for you dear reader I’ve got an enterprise application (below)

image

(because every enterprise had an application that shows pictures Smile; yes really this was a requirement honest Be right back)

Blend

So you are writing a sliverlight app, or course you could code it all by hand.

In the last year, I’ve even met Silverlight/WPF programmers, lets call them Xamlers, that turn their nose up at using a designer, hey I’m sure it’s got it’s advantages and these people know XAML better than me, but IMO life is too short and programmers are too expensive to be living in notepad. Would you code your designer code in a windows forms app? not use scaffolding in MVC? etc etc..

For me Blend is blessing in disguise, I’m not sure the mythical devigner that is both an amazing designer AND an amazing coder (term coined by Scott Hanselman I think)  exists, but Blend does really help.

Overview

The application is simple, It selects some pictures in a folder and displays them in a list. When an item is selected in the list the picture should zoom out from the listbox item and scale to it’s full size.

Simple ey… yes of course (when you know how).

 

Steps

1. Create a new expression blend silverlight project

image

2. Add a sample datasource, some text and a picture

image

image

image

3. Drag the collection onto the page

image

4) Select details mode in the properties pane, and drag out property 2

image

image

If you were now to run your application you’d see that when you select a picture it appears in the main picture also. But our requirements were to slide out the picture from the list itself.

5) Select the big picture and drag fluid move behaviour onto it

image

6) Change the tag property to datacontext

image

Now do the same for the Itemtemplate

image

7) Drop a FluidMotionSetTagBehaviour onto the image part,setting the datacontext

image

 

 

That’s all that’s needed, you app should now run, animations and all.

image

I would provide the sample but I’ve used 11megs of pictures so it’s a little too big to expect you to wait for Smile

I might get some time to reproduce this app in html5, android, c++, java would be nice to compare and contrast.

Start blending xamlers!




Expression blend visual states

clock March 24, 2010 07:57 by author Brian Keating |

A few people have asked me what's the easiest way of doing transitions on Silverlight.

One of the easiest ways has to be to use the VisualStateManager with Expression Blend, see screen show for sample logged in state.
If you don't know how to use this tool then start watching a few vids!

 

To change between states you can use this code..

 

 

if (WebContext.Current.User.IsAuthenticated)
{
    VisualStateManager.GoToState(this, (WebContext.Current.Authentication is WindowsAuthentication) ? "windowsAuth" : "LoggedIn", true);
}
else
{
    VisualStateManager.GoToState(this, "LoggedOut", true);
}





Converting your VS2008 projects to support xaml designer in Expression blend 3

clock December 4, 2009 07:58 by author Brian Keating |

If you've created a new WPF project in VS2008 and then you try to design your UX in Expressino Blend 3 you'll find that you get xaml view only.

What is required is to add

<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

 to the project file.

 




Expression blend for WPF/Silverlight 4

clock November 26, 2009 08:33 by author Brian Keating |

Announced at PDC this week

http://www.microsoft.com/downloads/details.aspx?FamilyID=6806e466-dd25-482b-a9b3-3f93d2599699&displaylang=en

 

Finally a version of blend that will open vs2010 projects (and of course handle wpf4 and silverlight 4)

 

it will run side by side with blend 3

enjoy Cool