C# Class BindableApplicationBar.BindableApplicationBar

Inheritance: System.Windows.Controls.Control
Afficher le fichier Open project: nokiadatagathering/WP7-Official Class Usage Examples

Méthodes publiques

Свойство Type Description
BackgroundColorProperty System.Windows.DependencyProperty
BindableOpacityProperty System.Windows.DependencyProperty
ButtonTemplateProperty System.Windows.DependencyProperty
ButtonsProperty System.Windows.DependencyProperty
ButtonsSourceProperty System.Windows.DependencyProperty
ForegroundColorProperty System.Windows.DependencyProperty
IsMenuEnabledProperty System.Windows.DependencyProperty
IsMenuVisibleProperty System.Windows.DependencyProperty
IsVisibleProperty System.Windows.DependencyProperty
MenuItemTemplateProperty System.Windows.DependencyProperty
MenuItemsProperty System.Windows.DependencyProperty
MenuItemsSourceProperty System.Windows.DependencyProperty
ModeProperty System.Windows.DependencyProperty

Méthodes publiques

Méthode Description
Attach ( PhoneApplicationPage parentPage ) : void

Attaches the BindableApplicationBar to the specified page, creating the ApplicationBar if required and adding the buttons and menu items specified in the Buttons and MenuItems properties.

BindableApplicationBar ( ) : System

Initializes a new instance of the BindableApplicationBar class.

Detach ( PhoneApplicationPage parentPage ) : void

Detaches from the specified page, removing all the buttons and menu items specified in the Buttons and MenuItems properties.

Note: The code in this method has not been tested and is likely not to work properly, will possibly raise exceptions and leak memory.

Méthodes protégées

Méthode Description
OnBackgroundColorChanged ( Color oldBackgroundColor, Color newBackgroundColor ) : void

Provides derived classes an opportunity to handle changes to the BackgroundColor property.

OnBindableOpacityChanged ( double oldBindableOpacity, double newBindableOpacity ) : void

Provides derived classes an opportunity to handle changes to the BindableOpacity property.

OnButtonTemplateChanged ( System.Windows.DataTemplate oldButtonTemplate, System.Windows.DataTemplate newButtonTemplate ) : void

Provides derived classes an opportunity to handle changes to the ButtonTemplate property.

OnButtonsChanged ( DependencyObjectCollection oldButtons, DependencyObjectCollection newButtons ) : void

Provides derived classes an opportunity to handle changes to the Buttons property.

OnButtonsSourceChanged ( IEnumerable oldButtonsSource, IEnumerable newButtonsSource ) : void

Provides derived classes an opportunity to handle changes to the ButtonsSource property.

OnForegroundColorChanged ( Color oldForegroundColor, Color newForegroundColor ) : void

Provides derived classes an opportunity to handle changes to the ForegroundColor property.

OnIsMenuEnabledChanged ( bool oldIsMenuEnabled, bool newIsMenuEnabled ) : void

Provides derived classes an opportunity to handle changes to the IsMenuEnabled property.

OnIsMenuVisibleChanged ( bool oldIsMenuVisible, bool newIsMenuVisible ) : void

Provides derived classes an opportunity to handle changes to the IsMenuVisible property.

OnIsVisibleChanged ( bool oldIsVisible, bool newIsVisible ) : void

Provides derived classes an opportunity to handle changes to the IsVisible property.

OnMenuItemTemplateChanged ( System.Windows.DataTemplate oldMenuItemTemplate, System.Windows.DataTemplate newMenuItemTemplate ) : void

Provides derived classes an opportunity to handle changes to the MenuItemTemplate property.

OnMenuItemsChanged ( DependencyObjectCollection oldMenuItems, DependencyObjectCollection newMenuItems ) : void

Provides derived classes an opportunity to handle changes to the MenuItems property.

OnMenuItemsSourceChanged ( IEnumerable oldMenuItemsSource, IEnumerable newMenuItemsSource ) : void

Provides derived classes an opportunity to handle changes to the MenuItemsSource property.

OnModeChanged ( ApplicationBarMode oldMode, ApplicationBarMode newMode ) : void

Provides derived classes an opportunity to handle changes to the Mode property.

Private Methods

Méthode Description
ApplicationBarStateChanged ( object sender, Microsoft.Phone.Shell.ApplicationBarStateChangedEventArgs e ) : void
AttachButton ( BindableApplicationBarButton button, int i ) : void
AttachButtons ( IEnumerable buttons ) : void
AttachMenuItem ( BindableApplicationBarMenuItem menuItem, int i ) : void
AttachMenuItems ( IEnumerable menuItems ) : void
ButtonsCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
ButtonsSourceCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
DetachButton ( BindableApplicationBarButton button ) : void
DetachButtons ( IEnumerable buttons ) : void
DetachMenuItem ( BindableApplicationBarMenuItem menuItem ) : void
DetachMenuItems ( IEnumerable menuItems ) : void
GenerateButtonsFromSource ( ) : void
GenerateMenuItemsFromSource ( ) : void
MenuItemsCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
MenuItemsSourceCollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
OnBackgroundColorChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the BackgroundColor property.

OnBindableOpacityChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the BindableOpacity property.

OnButtonTemplateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the ButtonTemplate property.

OnButtonsChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the Buttons property.

OnButtonsSourceChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the ButtonsSource property.

OnForegroundColorChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the ForegroundColor property.

OnIsMenuEnabledChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the IsMenuEnabled property.

OnIsMenuVisibleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the IsMenuVisible property.

OnIsVisibleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the IsVisible property.

OnMenuItemTemplateChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the MenuItemTemplate property.

OnMenuItemsChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the MenuItems property.

OnMenuItemsSourceChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the MenuItemsSource property.

OnModeChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Handles changes to the Mode property.

OnPageLoaded ( object sender, RoutedEventArgs e ) : void
OnPageNavigating ( object sender, System e ) : void
SetButtonsEnabled ( ) : void
SynchronizeProperties ( ) : void

Method Details

Attach() public méthode

Attaches the BindableApplicationBar to the specified page, creating the ApplicationBar if required and adding the buttons and menu items specified in the Buttons and MenuItems properties.
public Attach ( PhoneApplicationPage parentPage ) : void
parentPage PhoneApplicationPage The parentPage to attach to.
Résultat void

BindableApplicationBar() public méthode

Initializes a new instance of the BindableApplicationBar class.
public BindableApplicationBar ( ) : System
Résultat System

Detach() public méthode

Detaches from the specified page, removing all the buttons and menu items specified in the Buttons and MenuItems properties.
Note: The code in this method has not been tested and is likely not to work properly, will possibly raise exceptions and leak memory.
public Detach ( PhoneApplicationPage parentPage ) : void
parentPage PhoneApplicationPage The parentPage.
Résultat void

OnBackgroundColorChanged() protected méthode

Provides derived classes an opportunity to handle changes to the BackgroundColor property.
protected OnBackgroundColorChanged ( Color oldBackgroundColor, Color newBackgroundColor ) : void
oldBackgroundColor Color /// The old BackgroundColor value. ///
newBackgroundColor Color /// The new BackgroundColor value. ///
Résultat void

OnBindableOpacityChanged() protected méthode

Provides derived classes an opportunity to handle changes to the BindableOpacity property.
protected OnBindableOpacityChanged ( double oldBindableOpacity, double newBindableOpacity ) : void
oldBindableOpacity double /// The old BindableOpacity value. ///
newBindableOpacity double /// The new BindableOpacity value. ///
Résultat void

OnButtonTemplateChanged() protected méthode

Provides derived classes an opportunity to handle changes to the ButtonTemplate property.
protected OnButtonTemplateChanged ( System.Windows.DataTemplate oldButtonTemplate, System.Windows.DataTemplate newButtonTemplate ) : void
oldButtonTemplate System.Windows.DataTemplate The old button template.
newButtonTemplate System.Windows.DataTemplate The new button template.
Résultat void

OnButtonsChanged() protected méthode

Provides derived classes an opportunity to handle changes to the Buttons property.
protected OnButtonsChanged ( DependencyObjectCollection oldButtons, DependencyObjectCollection newButtons ) : void
oldButtons DependencyObjectCollection The old buttons.
newButtons DependencyObjectCollection The new buttons.
Résultat void

OnButtonsSourceChanged() protected méthode

Provides derived classes an opportunity to handle changes to the ButtonsSource property.
protected OnButtonsSourceChanged ( IEnumerable oldButtonsSource, IEnumerable newButtonsSource ) : void
oldButtonsSource IEnumerable The old buttons source.
newButtonsSource IEnumerable The new buttons source.
Résultat void

OnForegroundColorChanged() protected méthode

Provides derived classes an opportunity to handle changes to the ForegroundColor property.
protected OnForegroundColorChanged ( Color oldForegroundColor, Color newForegroundColor ) : void
oldForegroundColor Color /// The old ForegroundColor value. ///
newForegroundColor Color /// The new ForegroundColor value. ///
Résultat void

OnIsMenuEnabledChanged() protected méthode

Provides derived classes an opportunity to handle changes to the IsMenuEnabled property.
protected OnIsMenuEnabledChanged ( bool oldIsMenuEnabled, bool newIsMenuEnabled ) : void
oldIsMenuEnabled bool /// The old IsMenuEnabled value. ///
newIsMenuEnabled bool /// The new IsMenuEnabled value. ///
Résultat void

OnIsMenuVisibleChanged() protected méthode

Provides derived classes an opportunity to handle changes to the IsMenuVisible property.
protected OnIsMenuVisibleChanged ( bool oldIsMenuVisible, bool newIsMenuVisible ) : void
oldIsMenuVisible bool /// The old IsMenuVisible value. ///
newIsMenuVisible bool /// The new IsMenuVisible value. ///
Résultat void

OnIsVisibleChanged() protected méthode

Provides derived classes an opportunity to handle changes to the IsVisible property.
protected OnIsVisibleChanged ( bool oldIsVisible, bool newIsVisible ) : void
oldIsVisible bool The old IsVisible value.
newIsVisible bool The new IsVisible value.
Résultat void

OnMenuItemTemplateChanged() protected méthode

Provides derived classes an opportunity to handle changes to the MenuItemTemplate property.
protected OnMenuItemTemplateChanged ( System.Windows.DataTemplate oldMenuItemTemplate, System.Windows.DataTemplate newMenuItemTemplate ) : void
oldMenuItemTemplate System.Windows.DataTemplate /// The old MenuItemTemplate value. ///
newMenuItemTemplate System.Windows.DataTemplate /// The new MenuItemTemplate value. ///
Résultat void

OnMenuItemsChanged() protected méthode

Provides derived classes an opportunity to handle changes to the MenuItems property.
protected OnMenuItemsChanged ( DependencyObjectCollection oldMenuItems, DependencyObjectCollection newMenuItems ) : void
oldMenuItems DependencyObjectCollection The old menu items.
newMenuItems DependencyObjectCollection The new menu items.
Résultat void

OnMenuItemsSourceChanged() protected méthode

Provides derived classes an opportunity to handle changes to the MenuItemsSource property.
protected OnMenuItemsSourceChanged ( IEnumerable oldMenuItemsSource, IEnumerable newMenuItemsSource ) : void
oldMenuItemsSource IEnumerable /// The old MenuItemsSource value. ///
newMenuItemsSource IEnumerable /// The new MenuItemsSource value. ///
Résultat void

OnModeChanged() protected méthode

Provides derived classes an opportunity to handle changes to the Mode property.
protected OnModeChanged ( ApplicationBarMode oldMode, ApplicationBarMode newMode ) : void
oldMode ApplicationBarMode The old Mode value.
newMode ApplicationBarMode The new Mode value.
Résultat void

Property Details

BackgroundColorProperty public_oe static_oe property

BackgroundColor Dependency Property
public static DependencyProperty,System.Windows BackgroundColorProperty
Résultat System.Windows.DependencyProperty

BindableOpacityProperty public_oe static_oe property

BindableOpacity Dependency Property
public static DependencyProperty,System.Windows BindableOpacityProperty
Résultat System.Windows.DependencyProperty

ButtonTemplateProperty public_oe static_oe property

ButtonTemplate Dependency Property
public static DependencyProperty,System.Windows ButtonTemplateProperty
Résultat System.Windows.DependencyProperty

ButtonsProperty public_oe static_oe property

Buttons Dependency Property
public static DependencyProperty,System.Windows ButtonsProperty
Résultat System.Windows.DependencyProperty

ButtonsSourceProperty public_oe static_oe property

ButtonsSource Dependency Property
public static DependencyProperty,System.Windows ButtonsSourceProperty
Résultat System.Windows.DependencyProperty

ForegroundColorProperty public_oe static_oe property

ForegroundColor Dependency Property
public static DependencyProperty,System.Windows ForegroundColorProperty
Résultat System.Windows.DependencyProperty

IsMenuEnabledProperty public_oe static_oe property

IsMenuEnabled Dependency Property
public static DependencyProperty,System.Windows IsMenuEnabledProperty
Résultat System.Windows.DependencyProperty

IsMenuVisibleProperty public_oe static_oe property

IsMenuVisible Dependency Property
public static DependencyProperty,System.Windows IsMenuVisibleProperty
Résultat System.Windows.DependencyProperty

IsVisibleProperty public_oe static_oe property

IsVisible Dependency Property
public static DependencyProperty,System.Windows IsVisibleProperty
Résultat System.Windows.DependencyProperty

MenuItemTemplateProperty public_oe static_oe property

MenuItemTemplate Dependency Property
public static DependencyProperty,System.Windows MenuItemTemplateProperty
Résultat System.Windows.DependencyProperty

MenuItemsProperty public_oe static_oe property

MenuItems Dependency Property
public static DependencyProperty,System.Windows MenuItemsProperty
Résultat System.Windows.DependencyProperty

MenuItemsSourceProperty public_oe static_oe property

MenuItemsSource Dependency Property
public static DependencyProperty,System.Windows MenuItemsSourceProperty
Résultat System.Windows.DependencyProperty

ModeProperty public_oe static_oe property

Mode Dependency Property
public static DependencyProperty,System.Windows ModeProperty
Résultat System.Windows.DependencyProperty