Applying new style for mobile control


E

Eugene

Hi,

I'm trying create new style property for mobile panel control and getting
following error:
Specified cast is not valid
Line 21: set
Line 22: {
Line 23: this[DirectionKey] = value;
Line 24: }

Here is my code(just like in msdn site)
public class StyleWithRtl : Style
{
public static String DirectionKey =
RegisterStyle("Direction", typeof(String), string.Empty, true).ToString();


public String Direction
{
get
{
return (String)this[DirectionKey];
}
set
{
this[DirectionKey] = value;
}
}


}

Any help?
thanks,
Eugene
 
Ad

Advertisements


Top