Note that there are some explanatory texts on larger screens.

plurals
  1. POUri in Resource dictionary in WP7
    primarykey
    data
    text
    <p>I have defined one resource dictionary in my wp7 project in themes folder with name of darktheme.xaml</p> <pre><code>&lt;ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=System"&gt; &lt;sys:Uri x:Key="AppBarSettingsImage"&gt;/Images/dark/Settings.png&lt;/sys:Uri&gt; &lt;sys:Uri x:Key="AppBarTimingsImage" &gt;/Images/dark/Timings.png&lt;/sys:Uri&gt; &lt;/ResourceDictionary&gt; </code></pre> <p>And I am calling this is my App.xaml like this</p> <pre><code>&lt;Application.Resources&gt; &lt;ResourceDictionary&gt; &lt;ResourceDictionary.MergedDictionaries&gt; &lt;ResourceDictionary Source="Themes/DarkTheme.xaml"/&gt; &lt;/ResourceDictionary.MergedDictionaries&gt; &lt;/ResourceDictionary&gt; &lt;/Application.Resources&gt; </code></pre> <p>I did all images as build action Content and CopyIfnewer And for my theme build action as page</p> <p>Once I run my project it thorows the unhandled exception for loading the resource dictionary. But When I comment out this code in my theme (resource dictionary) it start working.</p> <pre><code>&lt;sys:Uri x:Key="AppBarSettingsImage"&gt;/Images/dark/Settings.png&lt;/sys:Uri&gt; &lt;sys:Uri x:Key="AppBarTimingsImage" &gt;/Images/dark/Timings.png&lt;/sys:Uri&gt; </code></pre> <p>Actually I am setting these uri for setting my appbar iconuri property to set with my these static resources. As discussed here <a href="https://stackoverflow.com/questions/5470941/wp7-image-uri-as-staticresource">WP7 Image Uri as StaticResource</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload