I have following code in WPF XAML and want it to be converted to Silverlight 4:
<Setter
Property="Background"
Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
<Setter>
Unfortunately, Silverlight does not support x:Static.
Does anybody know how to port it properly without code behind, XAML-only?
Since you cannot access Static properties like that,you’ve to define your own “wrapper” class that will wrap the static properties, something like this:
Then do this in XAML
Hope, it gives you some idea. 🙂
See this also:
Retrieving value from static extension XAML