Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Despite your comment to the contrary I doubt the use of "." in your resource key is really the source of your problem. In this situation the "." has no special meaning and would not impact how the resource is accessed. (I've tried and failed to reproduce any problem with it).</p> <p>There is though a very big difference between using the <code>{StaticResource MyName}</code> mark up extension and an attempt to find the resource programmatically.</p> <p>The markup extension causes the XamlParser to look for the specified key the <code>Resources</code> property of the <code>FrameworkElement</code> to which the property being assigned belongs. If the key is not found it looks for it in the parent <code>FrameworkElement</code> and it keeps going until it reaches the root <code>FrameworkElement</code>. If it is still not found it has a look in the Application's Resources property.</p> <p>On the other hand this code:-</p> <pre><code>string myCustomValue = this.Resources[MyCustomValue] as string; </code></pre> <p>sf just looking in the single Resources property for the user control. No attempt is made to hunt down the key in ancestors or in the application resources. Its a simple Dictionary lookup. This I suspect is what was really tripping you up.</p> <p>Having said that I would say the using "." in a resource key may not be a good idea. The "." does have meaning in various XAML scenarios already so using it in key names as well has the potential to confuse a developer reading the code even though Silverlight is quite happy with it.</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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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