15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

navigation ❘ 1099<br />

<br />

<br />

<br />

NavigateUri=”/About” TargetName=”ContentFrame”<br />

Content=”about”/><br />

The Welcome page is shown with loading the Silverlight control because it is referenced directly with the<br />

Source property from the Frame element. This Page just contains a TextBlock element with information<br />

about the application, which is contained within a Border element for defining some visual effects that is<br />

contained within a Canvas element for positioning.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

code snippet WCFRegistration/Views/Welcome.xaml<br />

Within the Resources section of the Canvas element, two Storyboard elements are defined to do an<br />

animation. This is very similar to the animations you saw in Chapter 35 for WPF. Minor differences can<br />

be detected between these technologies with animations; for example, the animations with Silverlight<br />

don’t define the AccelerationRatio <strong>and</strong> DecelerationRatio properties you know from WPF. However,<br />

you can get the same features using key-frame animations or with ease functions. Ease functions were in<br />

Silverlight before they became available in WPF, which was extended in .<strong>NET</strong> 4 to include this feature.<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!