public ChannelPage() { InitializeComponent(); ApplicationBar.Mode = ApplicationBarMode.Default; _subscribeButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Subscribe.png", AppResources.Subscribe, Subscribe_Click); _unsubscribeButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Unsubscribe.png", AppResources.Unsubscribe, Unsubscribe_Click); }
public VideoPage() { InitializeComponent(); _autoPlay = SettingsHelper.GetIsAutoPlayVideo(); Pivot.SelectionChanged += PivotOnSelectionChanged; SubscribePlayerEvents(player); player.AutoPlay = _autoPlay; PhoneApplicationService.Current.Deactivated += Current_Deactivated; PhoneApplicationService.Current.Activated += Current_Activated; LayoutRoot.SizeChanged += OnLayoutRootSizeChanged; _sensor = SimpleOrientationSensor.GetDefault(); _sendApplicationBar = new ApplicationBar(); _sendApplicationBarButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Send.png", AppResources.Send, Send_Click); _sendApplicationBar.Buttons.Add(_sendApplicationBarButton); _currentApplicationBar = new ApplicationBar(); _currentApplicationBar.Mode = ApplicationBarMode.Minimized; _currentApplicationBar.Buttons.Add(ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Home.png", AppResources.Home, Home_Click)); //_currentApplicationBar.Buttons.Add(ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Refresh.png", AppResources.Refresh, Refresh_Click)); _currentApplicationBar.MenuItems.Add(ApplicationBarHelper.CreateAApplicationBarMenuItem(AppResources.CopyVideoLink, CopyVideoUrl_Click)); _favoritesApplicationBarButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.StarAdd.png", AppResources.AddToFavorites, AddToFavorites_Click); _addToPlaylistApplicationBarButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Add.png", AppResources.AddToPlaylist, AddToPlaylist_Click); ApplicationBar = _currentApplicationBar; }
private void BuildLocalizedApplicationBar() { var appBar = new ApplicationBar(); var homeButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Home.png", AppResources.Home, Home_Click); appBar.Buttons.Add(homeButton); var playAllButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Play.png", AppResources.PlayAll, Play_Click); appBar.Buttons.Add(playAllButton); ApplicationBar = appBar; }
private void BuildLocalizedApplicationBar() { var appBar = new ApplicationBar(); var saveButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Save.png", AppResources.Save, Save_Click); appBar.Buttons.Add(saveButton); var cancelButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Cancel.png", AppResources.Cancel, Cancel_Click); appBar.Buttons.Add(cancelButton); ApplicationBar = appBar; }
// Constructor public MainPage() { InitializeComponent(); // Set the data context of the listbox control to the sample data DataContext = App.ViewModel; var currentApplicationBar = new ApplicationBar(); currentApplicationBar.Mode = ApplicationBarMode.Minimized; currentApplicationBar.Buttons.Add(ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Refresh.png", AppResources.Refresh, Refresh_Click)); ApplicationBar = currentApplicationBar; }
private void BuildApplicationBar(int selectedIndex) { var appBar = new ApplicationBar { Mode = ApplicationBarMode.Minimized }; var homeButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Home.png", AppResources.Home, Home_Click); var managePlaylistsButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Manage.png", AppResources.Manage, PlaylistManage_Click); appBar.Buttons.Add(homeButton); if (selectedIndex == 3) { appBar.Buttons.Add(managePlaylistsButton); } ApplicationBar = appBar; }
private void BuildLocalizedApplicationBar() { // Set the page's AplipcationBar to a new instance of ApplicationBar. ApplicationBar appBar; if (!Application.Current.Resources.Contains("GlobalAppBar")) { appBar = new ApplicationBar(); } else { appBar = Application.Current.Resources["GlobalAppBar"] as ApplicationBar; } var homeButton = ApplicationBarHelper.CreateApplicationBarIconButton("/Toolkit.Content/ApplicationBar.Home.png", AppResources.Home, Home_Click); appBar.Buttons.Clear(); appBar.MenuItems.Clear(); appBar.Buttons.Add(homeButton); }