Catel.Silverlight

Topics: Questions
Jan 17, 2013 at 7:44 AM
Edited Jan 17, 2013 at 7:46 AM

Hi there. I've installed Catel 3.4. Following the Catel Offline documentation, when creating a new Silverlight Navigation Project and attempting to add references with "Manage Nuget Packages" the Catel.Silverlight entry is unavailable in the list. Catel.Core, Catel.MVVM etc however are. Any help would be appreciated please.

(VS 2010 SP1, Framework 4, Silverlight 5)

Coordinator
Jan 17, 2013 at 8:12 AM

Catel.Silverlight is obsolete, documentation is not up-to-date then. Which pages did you find this?

Just use Catel.Core, Catel.MVVM and Catel.Extensions.Controls, they are now the same for all platforms.

Jan 17, 2013 at 9:26 AM

Hi Geert,

Thank you so much for a very speedy reply.

The page is “Creating your first Silverlight project” under Getting Started/Applications

For your info: Once these references are added and I build the app I get the following error for the About and Home pages:

“Error 1 'Catel.Windows.Controls.Page<SilverlightApplication1.ViewModels.AboutViewModel>' is obsolete: 'Please use 'Catel.Windows.Controls.Page' instead. Will be removed in version '4.0'.' C:\Development\Silverlight\SilverlightApplication1\Views\About.xaml

These are easily fixed by removing <AboutViewModel> and <HomeViewModel>

The app now builds but fails when running on InitializeComponent() in the App.xaml.cs class with error:

“Failed to assign to property 'System.Windows.ResourceDictionary.Source'. [Line: 10 Position: 44]

<ResourceDictionary.MergedDictionaries>

<!-- Set theme -->

<ResourceDictionary Source="/Catel.Silverlight;component/themes/generic.xaml" />

</ResourceDictionary.MergedDictionaries>

This is fixed by changing Catel.Silverlight to SilverlightApplication1 in the generic.xaml file.

Running the app now fails on the same line with error “Cycle detected in merge…”

This is resolved by commenting out the following in the generic.xaml page:

<!--<ResourceDictionary.MergedDictionaries>-->

<!-- Set theme -->

<!--<ResourceDictionary Source="/SilverlightApplication1;component/themes/generic.xaml" />-->

<!--</ResourceDictionary.MergedDictionaries>-->

The app now works perfectly thanks.

Once again thanks for the prompt reply.

From: GeertvanHorrik [email removed]
Sent: 17 January 2013 11:13 AM
To: norman@proelec.co.za
Subject: Re: Catel.Silverlight [Catel:429871]

From: GeertvanHorrik

Catel.Silverlight is obsolete, documentation is not up-to-date then. Which pages did you find this?

Just use Catel.Core, Catel.MVVM and Catel.Extensions.Controls, they are now the same for all platforms.

Coordinator
Jan 17, 2013 at 10:21 AM

Thanks for the detailed info. I will look into the templates.

Coordinator
Jan 17, 2013 at 10:24 AM

It looks like you are using really old templates. They are already updated. Make sure to get the latest templates here:

http://catel.codeplex.com/releases/view/87333

Jan 17, 2013 at 12:25 PM

Aah great, thanks for that.

From: GeertvanHorrik [email removed]
Sent: 17 January 2013 01:24 PM
To: norman@proelec.co.za
Subject: Re: Catel.Silverlight [Catel:429871]

From: GeertvanHorrik

It looks like you are using really old templates. They are already updated. Make sure to get the latest templates here:

http://catel.codeplex.com/releases/view/87333