user-avatar
Today is Friday
May 24, 2013

Tag: Bind with Enum

February 23, 2010

Bind with Enum in Silverlight

by Ashish Sehajpal — Categories: Development — Tags: , 11 Comments

Silverlight doesn’t have any kind of ObjEctDataProvider with it. So the famous example of binding the controls with an ObjectDataProvider doesn’t work with silverlight as it works with WPF <UserControl.Resources> <ObjectDataProvider MethodName=“GetValues” ObjectType=”{x:Type sys:Enum}“  x:Key=“AlignmentValues”>   <ObjectDataProvider.MethodParameters>           <x:Type TypeName=“HorizontalAlignment” />    </ObjectDataProvider.MethodParameters> </ObjectDataProvider> This can be done via code behind in the Silverlight.  Just [...]

© 2013 Sehajpal.com All rights reserved - Mobile View