We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Problems using resource dictionary in WP8

I'm trying to use some of the icons from MetroStudio in a WP8 app and have hit a wall. 

I've exported the icons I want to use as XAML and made them an application resource. In VS.Net and Blend I can use the following syntax: 
<Button Content="{StaticResource CoolIcon}" />
and the button fills with the icon in design view. However, when I run the app on the emulator I get a XAML parse exception. 

I've only found one mention of something that was remotely related on the internet so far, and it suggested that Silverlight 3 didn't allow binding to Geometry and Path elements. The workaround that post suggested did end up working in VS.Net/Blend and the emulator:
<Path Data="{StaticResource CoolIconPathData}"></Path>
and change the generated resource to
<System:String x:Key="CoolIconPathData">F1M2278.07,etc.etc.etc.</System:String>

I'm wondering if you guys can suggest a way I can bind to the .xaml that MetroStudio generates in my WP8 app without having to take this approach. 

2 Replies

DV Derek Vox June 14, 2013 01:45 PM UTC

I can confirm I have the exact same issue! (Using Metro/WinRT with Visual Studio Professional 2012.)

Are there any samples out there for the best way to incorporate the Xaml generated by the MetroStudio? Presumably just incorporate this into your Resource Dictionaries, but how then do you go about displaying the images from your application views? And what controls are compatible with the generated Xaml?

VV Vignesh V Syncfusion Team July 4, 2013 01:07 PM UTC


Sorry for the delay in getting back to you.

We have prepared a sample to display Metrostudio generated XAML images by binding the path data from resources to Button Content. 

Please find the attached sample in below link,

But we will consider your requirement of binding MetroStudio generated xaml images directly through resources in our future MetroStudio releases.

Please let us know if you have any queries,

Vignesh V.

Live Chat Icon For mobile
Up arrow icon