How do I reference a staticresource in XAML? (I'm not talking about binding expr开发者_如何学编程essions..) As in this example:
<csla:CslaDataProvider
x:Key="Rekvisition"
ObjectType="{x:Type model.faktura.rekvisitioner:Rekvisition}"
FactoryMethod="NewRekvisition"
IsAsynchronous="False"
ManageObjectLifetime="True"
IsInitialLoadEnabled="False"
>
<csla:CslaDataProvider.FactoryParameters>
<x:Array Type="ReadOnlyBruger">
INSERT REFERENCE TO STATIC RESOURCE
</x:Array>
</csla:CslaDataProvider.FactoryParameters>
</csla:CslaDataProvider>
/Fredrik
You can use the StaticResourceExtension
with element syntax:
<x:Array Type="ReadOnlyBruger">
<StaticResourceExtension ResourceKey="Rekvisition" />
</x:Array>
Use {StaticResource Rekvisition}
elsewhere in your xaml.
精彩评论