public BindableApplicationBar()
{
this.Buttons = new DependencyObjectCollection<BindableApplicationBarButton>();
this.MenuItems = new DependencyObjectCollection<BindableApplicationBarMenuItem>();
DefaultStyleKey = typeof(BindableApplicationBar);
this.Buttons.CollectionChanged +=
this.ButtonsCollectionChanged;
this.MenuItems.CollectionChanged +=
this.MenuItemsCollectionChanged;
this.buttonsSourceButtons.CollectionChanged +=
this.ButtonsCollectionChanged;
this.menuItemsSourceMenuItems.CollectionChanged +=
this.MenuItemsCollectionChanged;
SetBinding(
BindableOpacityProperty,
new Binding("Opacity")
{
RelativeSource =
new RelativeSource(RelativeSourceMode.Self)
});
}
#endregion