I need to use an ObjectDataProvider in a resource file to pull in the
System.Window.TextAlignment enum which is part of the PresentationCore.DLL.
I was able to do this with the HorizontalAlignment enum which uses the
PresentationCore.DLL like this:
xmlns:sysWin="clr-namespace:System.Windows;assembly=PresentationFram ework"
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}"
x:Key="resHorizontalAlignment">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="sysWin:HorizontalAlignment"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
But for 'TextAlignment ', this does NOT work:
xmlns:sysWinCore="clr-namespace:System.Windows.Interop;assembly=Presenta tionCore"
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}"
x:Key="resTextAlignment">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="sysWinCore:TextAlignment"/>
</ObjectDataProvider.MethodParameters>
</ObjectDataProvider>
I get the compile error:
Error 101 Type 'TextAlignment' was not found.
Any advice:
Thanks
--
mo*******@newsgroup.nospam