Example #1
0
        private static PhoneApplicationPageBackKeyPressCommandBehavior GetOrCreateBehavior(Microsoft.Phone.Controls.PhoneApplicationPage buttonBase)
        {
            PhoneApplicationPageBackKeyPressCommandBehavior behavior = buttonBase.GetValue(BackKeyPressCommandBehaviorProperty) as PhoneApplicationPageBackKeyPressCommandBehavior;

            if (behavior == null)
            {
                behavior = new PhoneApplicationPageBackKeyPressCommandBehavior(buttonBase);
                buttonBase.SetValue(BackKeyPressCommandBehaviorProperty, behavior);
            }

            return(behavior);
        }
Example #2
0
 public static object GetCommandParameter(Microsoft.Phone.Controls.PhoneApplicationPage buttonBase)
 {
     return(buttonBase.GetValue(CommandParameterProperty));
 }
Example #3
0
 public static ICommand GetCommand(Microsoft.Phone.Controls.PhoneApplicationPage buttonBase)
 {
     return(buttonBase.GetValue(CommandProperty) as ICommand);
 }
 public static ApplicationBar GetApplicationBar(Microsoft.Phone.Controls.PhoneApplicationPage obj)
 {
     return((ApplicationBar)obj.GetValue(ApplicationBarProperty));
 }