Sydney May23rd – “Windows Presentation Foundation” Community Workshop

April 29, 2009

Although I’m more in to Silverlight than WPF I thought this might be handy for some people out there: On the 23rd of May Microsoft are holding a WPF workshop in Sydney. Cost is $100 with proceeds going towards the bushfire appeal.

For more details check out Dave Glover’s post here.


Sydney – SDDN Meeting and Nerd Dinner

April 29, 2009

First ever Sydney meeting!

This meeting Chris Anderson (blog), from Peer Placements will be discussing advanced styling in Silverlight for both developers and designers. Topics will cover styling strategies, tools, advanced xaml techniques, fashions, and a discussion on designing user experiences.

Jordan Knight (Blog) from Readify will run through the exciting new features in Silverlight 3, and demonstrate how you might use them in a real working reference application. This in depth session will cover perspective 3D, pixel shaders, navigation features, out of browser and much more. Other concepts like Model-View-ViewModel, dependency injection, unit testing and designing template friendly (read designer friendly) applications will also be touched upon.

Win!!

Attendees will have the opportunity to win a copy of the full Expression 2 suite, worth $1000!

Details

The date and time: Tuesday May 5 at 6:00 PM for a 6:30 PM start.

The venue is the Pyrmont Bridge Hotel, Level 2, Pyrmont, NSW. See mmap for details.

Attendance is FREE, but please RSVP by entering your details in the registration in the registration tool on the site (here) or send an email to info@sddn.org.au.

Nerd Dinner

We are holding a nerd dinner in Sydney on Thursday May 7 – P.J. O’Briens.

Register here.

Hope to see you there!!


SDDN Meeting, 30th April – Melbourne

April 23, 2009

Our next meeting is on Thursday the 30th of April in Melbourne

What’s on?

This meeting we will see Dave Glover (blog), Developer Platform Evangelist from Microsoft give a primer on the new Silverlight 3 RIA Services feature. RIA Services aims to bring the client and server portions of your applications closer together.

Jordan Knight (Blog) from Readify will run through the exciting new features in Silverlight 3, and demonstrate how you might use them in a real working reference application. This in depth session will cover perspective 3D, pixel shaders, navigation features, out of browser and much more. Other concepts like Model-View-ViewModel, dependency injection, unit testing and designing template friendly (read designer friendly) applications will also be touched upon.

WIN!

Attendees will have the opportunity to win a copy of the full Expression 2 suite, worth $1000!

When and Where?

The date and time: Thursday April 30 at 5:30 PM for a 6:00 PM start.

The venue is Microsoft Theatre, Level 5, 4 Freshwater Place, Southbank.

Attendance is FREE, but please RSVP by entering your details in the registration tool at the top of the SDDN site.

Pizza will be provided to keep those tummies from rumbling.


Silverlight training in Adelaide a great success

April 20, 2009

The SDDN has held it’s first ever event outside Melbourne… a free training day in Adelaide.

We had 20 people in for the day and a great time was had by all. The attendees (and the presenters) had a great time. We laughed we cried (when the demo gods struck) and most of all we traded knowledge on a range of Silverlight topics from basics to some more advanced concepts. These days are really beneficial to the attendees and the presenters… we all chat and figure out where everyone is up to, and talk about Silverlight projects here and there. It’s great to see what others are working on and the challenges they are finding.

A very special thanks to Jason Schluter who put in all the leg work for the event, finding the venue and some people to run it! Jason presented the morning session, including the introduction stuff and he then walked them through creating a full game in Silverlight.

The afternoon I ran the class through networking, binding and the HTML DOM Bridge (they always love that last one). We also talked some shop about MVVM and some other common Silverlight patterns and concepts.

The venue was provided by Hire Intelligence, and the facilities were A-1.

But… the biggest surprise of the day was Academy IT, run by Brian Peel and Kim Paschero. These guys were our hosts – they opened the rooms, pre-installed the machines, handled registration and lunch. Can I just say that they are absolute pro’s who have clearly handled this kind of event many times over.

Academy IT run corporate and public training, which can be tailored plus much more. They have partnerships to operate in cities all around Australia so check them out. Head over to their site for more information. Oh yeah, did I mention that these guys are community group (i.e. SDDN) friendly and understand our “constraints” – i.e. they were very accommodating :)

We’ve had some great feedback from the attendees but as always if you have something to say, good or bad then we implore you to drop us a line a the SDDN info mailing address (I’m not linking it for spam reasons). Feedback lets us know how much you want these kind of days and session in your city :)

Coming up next: SDDN sessions in Perth (22nd), Melbourne (30th) and Sydney (5th May)…

Jordan.

SDDN training in Adelaide

SDDN training in Adelaide

SDDN training in Adelaide


Silverlight control that can play animations when the DataContext changes

April 16, 2009

For a while now I’ve wanted a control which when the DataContext changes plays an “out” animation, then changes the DataContext then plays an “in” animation.

This is a custom control which can detect changes to the DataContext and play these animations accordingly.

The control also exposes a DataContext changed event which you can use to add in extra functionality.

The usage of the control is very simple: It can take any content and it’s all templatable through Blend -> just edit the control template and start playing around with the Visual State Manager states. Cool huh?

Sample and Source

You can see the control in action for yourself here. It’s built against Silverlight 3.

<Sample Code>

Context Content Control Source

</Sample Code>

How it works

The control starts off by picking out its own DataContext binding and redirecting it to a new property called SpecialDataContext. This means that when the DataContext object is updated the control won’t immediately apply the change. This is important as you don’t want the new data to appear as the control is animating out. You want the change over to happen once the out animation is completed and before the in animation starts.

 BindingExpression exp = this.GetBindingExpression(DataContextProperty);

if (exp != null)
{
    Binding newBinding = new Binding(exp.ParentBinding.Path.Path);

    newBinding.Source = exp.DataItem;

    //Bind it to the special context property
    this.SetBinding(SpecialContextProperty, newBinding);

    this.DataContext = this.DataContext; //break the binding on datacontext (setting a property breaks binding)
}

The code removes the binding from DataContext (but setting it to itself… this clears binding). Now the control is intercepting changes to data context.

Next, in OnApplyTemplate(), the control picks out the Visual State Storyboards from the template. This is so it can detect when the state transitions have completed.

The SpecialContextProperty dependency property is the “new” DataContext property. Changes are collected and pumped in to onDataContextChange where the code selects which state to transition to.

The most exciting state transition is “ContextChanging”. Once it is complete (handled in storyContextChanging_Completed) the control changes the DataContext and moves back to the NormalContext state.

Usage

Usage is very easy… just bind it’s datacontext and off you go. In the example available here the control is bound to the selected item in a list. Click items in the list will cause the control to switch between information which a cool animation.

<ListBox x:Name="list" ItemsSource="{Binding Path=List}" ItemTemplate="{StaticResource DataTemplate1}" SelectedItem="{Binding Mode=TwoWay, Path=SelectedClass}" Grid.RowSpan="2"/>

<webjak:ContextContentControl DataContext="{Binding Path=SelectedClass}" Margin="8,8,0,0" VerticalAlignment="Stretch" Grid.Row="1" Height="174" Width="320" HorizontalAlignment="Stretch">
    <StackPanel>
	<TextBlock Text="{Binding Name}" Foreground="#FFFFFFFF" FontSize="18" FontFamily="Georgia"/>
	<TextBlock Text="{Binding Age}" Foreground="#FFFFFFFF" FontSize="18" FontFamily="Georgia"/>
	<TextBlock Text="{Binding Phone}" Foreground="#FFFFFFFF" FontSize="18" FontFamily="Georgia"/>
    </StackPanel>
</webjak:ContextContentControl>

Templates

There is a default template provided, but to create your own, go in to Blend, right click the control and edit its Control Template! It’s that easy. Set how the control looks in each state and enjoy :)


Nerd Dinner, Melbourne 9 April

April 6, 2009

This Thursday, 9th April we are having a nerd dinner in Melbourne at the Elephant and Wheelbarrow on Bourke Street – 6PM till late.

I was talking with a few old friends about catching up, and it grew from there in to an open invite to all nerds :)

Remember that Friday is a public holiday so there are no excuses!

To register (so we can book) head over to NerdDinner.com.

See you there!


IE8 web slices eq Cool

April 3, 2009

Over the last few months I’ve been travelling around the countryside implementing IE8 Web Slices for various companies. I’ve been to a couple of big sports web sites and a large online retailer all looking for new ways to get return visitors to their sites.

I must admit I cannot believe I get paid to implement these things – when you see how easy they are to implement you’ll fall off your chair. Although this article is not about the technical implementation of web slices I’ll run through the basic workflow of a slice and some “did you knows”.

Refresh Me

Very quickly, a web slice is a way of taking a portion of a page and displaying it in a drop down from the user’s toolbar. It updates like an RSS feed and when changes occur the user is notified via the toolbar item for the slice blinking.

You could point the web slice to a custom search, product offers or the latest sports scores. The slice’s update and display URLs can contain query strings so you can load dynamic data with ease.

How Slices Work

Slices are fully implemented in HTML using the web slice / hAtom micro format. For full documentation on implementation slices see the here.

The workflow for a web slice is Discovery -> Update -> Display.

Discovery

Discovery happens in your normal content page. You wrap up an area of your content in a slice. This slice with be outlined in green when the user hovers over it and it also shows up on the toolbar as a special green RSS feed icon.

Did you know? That you don’t have to show the content that you wrapped. You can load any content you like in to the source… wrapping is only for discovery purposes.

For example: You may wrap up the search text box on your search results page in a slice and then in the slice itself show a custom search results view… notify the user when ever the search changes.

Did you know? That you can have multiple slices in a page. Each slice will be displayed in the green RSS feed icon drop down. You can also nominate the default slice that will be loaded when the user clicks directly on the special green RSS feed icon.

Update

During slice creation you have a few options for updates. You can either have the slice load the original page and scan the wrapped area for changes, or you can configure the slice to check an alternate URL. The update page uses the same web slice / hAtom format as the discovery page.

For example: The user has searched for iPod on your site. You construct the Web Slice implementation dynamically and set the update URL to /slices/Update.aspx?searchQuery=iPod. You can create this page to be super light weight as the user will never see it, it’s a browser only file. Updates can be super lightweight!

Did you know? You can create a hash of your search results for the browser to compare changes against… it doesn’t get more efficient (on the wire) than that!

The update page also serves as the configuration page. This means you can have multiple slices which point to the same update page. This page contains information like the slice title (in the toolbar) and the page to get the display data.

Did you know? That you can have multiple slices in one update file, each with their own ID. During slice discovery you can stipulate which slice you intended by using a #based syntax in the update URL.

Display

The display page doesn’t require any special micro format, and you can go crazy with a couple of restrictions.

Firstly: you get a display area of 320 x 240 – so go easy on the size of things.

Secondly: there are a few restrictions to the JavaScript you can run (like opening popups).

Third(ly??): you won’t automatically get scroll bars in the slice… although the user can manually drag to resize the screen to any size they like.

Did you know? That you can run things like Silverlight in slices!

Did you know? That you can set overflow on your outer DIV elements to create scrolling in slices.

Did you know? That you can set target=”_blank” in your anchors in the slice and have them open in the current tab rather than in the slice window.

Cool huh

Now that IE8 is out of beta you are free to implement slices in your own sites.

Did you know? IE8′s independent benchmark results were a pleasant and welcome surprise! Testing of IE8 revealed it is (as of writing) the fastest browser… See for yourself


Going National: Upcoming SDDN Meetings and Training Days

April 2, 2009

We’ve been busy at the Silverlight Designer and Developer Network…

The SDDN is expanding around Australia – with meetings and training days popping up east and west.

Free Training Day – Adelaide Saturday 18th April

After the successful Silverlight training day held in Melbourne, with the help of the Silverlight Designer and Developer Network, the Free Silverlight Training Day is coming to Adelaide!

With Silverlight moving into a serious Web 2.0 platform, and Microsoft moving it into a key position of their Software and Services vision, now’s the time to get started with Silverlight.

AOL, eBay, Netflix, CBS Sports Online, Samsung Electronics and Yahoo! Japan are all organizations currently using Silverlight.

Been Studying WPF? Silverlight is WPF for the web. Your skills with XAML won’t be waisted as Silverlight and WPF share the majority the same UI coding practices.

Gain an understanding of varied Silverlight topics such as XAML, animation, data binding, communication and more and get the start you need to create great Silverlight applications!

Registration

To register your interest, follow the registration process at ACS.

A Special Thanks to

Hire Intelligence
Academy IT Pty Ltd
And Microsoft

hireintelligencelogo2 a5

Without your help this event simply wouldn’t be possible.

Free Silverlight Training Day
When: 18th April 2009 – 9:00am to 4:30pm.
Cost: Free!
Where: Pirie Lease and their address is Level 4, 74 Pirie Street, Adelaide (next to Subway).
Contact: contact@blender3dlive.com or the SDDN info mail address.

How awesome!

SDDN Meeting – Perth

That’s right, on Wednesday the 22nd of April the SDDN is having it’s first meeting in Perth.

Thanks to Stephen Price (@lyynx) SDDN is go in Perth.

All the information can be found on Stephen’s post here.

SDDN Meeting – Sydney

The first SDDN Sydney meeting is to be held on the 5th of May.

Details on Venue and content to come, but lock it in!

SDDN Meeting – Melbourne

The next meeting of the Melbourne chapter will be at 6PM on Thursday April 30th @ Microsoft, Level 5, 4 Freshwater Place, Southbank.

The content of the meeting is being finalised as I write this, but expect plenty of Silverlight 3 action.

As we get more and more organised setting up the group around the country each chapter will settle in to regular meetings. The Melbourne chapter will meet every six weeks after April :)

Silverlight Training Day Roadshow

We’ve had a great response to our training day in Melbourne with requests for similar days all around the country. If you’d like to have a training day in your city (including another one in Melbourne) then please send an email to the SDDN info email address (info with the SDDN URL on the end – damn spammers).

As we say – these days are not cheap to put on even though we take no profit what so ever. Room costs etc have to be covered. So the more you shout to more money we can scam from sponsors to put on the days!

That said, if you know of cheap rooms with computers and capacity to run an MS VPC image then shout out (universities and TAFEs I’m looking at you!)