예제 #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);
        }
예제 #2
0
 public static object GetCommandParameter(Microsoft.Phone.Controls.PhoneApplicationPage buttonBase)
 {
     return(buttonBase.GetValue(CommandParameterProperty));
 }
예제 #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));
 }