Nov 15, 2008 at 1:35 PM
Edited Nov 15, 2008 at 2:40 PM
It is correct that x:static does not exist in SL2 and its not supported. However SL2 does support to use binding expression to CLR object and its properties.
I am binding by expression all XAML string values to resource properties on SL2WithPrism CodePlex project.
For example, following works fine and you could just use any of CLR class and its properties (public const string or public static string) rather than resource class generated property
In shortly, the code taken from SL2WithPrism you could realize this by:
1. Define your namespace in xaml (From SL2WithPrism/Shell example)
2. Create a known resource name (from SL2WithPrism/Shell example)
3. Bind directly to your resource name key in xaml (From SL2WithPrism/Shell example)
FontWeight="Bold" Foreground="#FFFFFFFF" FontSize="18"
If I try to use same approach to RegionName then Unity will throw type unresolved exception.
In quick look, I saw that binding expression was in the string rather than actual value and Unity was trying to resolve this expression and failed.
But I haven’t had a time yet to see where it goes wrong exactly but I think it’s a bug. And this is also the reason I created this thread.
I am sorry that I wasn’t clear enough in first shot of this thread but I hope this describes the issue/bug better related to RegionManager and binding expression.