public ManageView() { InitializeComponent(); _pinSelectedSearchResultButton = new ApplicationBarIconButton { IconUri = new Uri("\\Assets\\AddPlace.png", UriKind.Relative), Text = "pin search" }; _pinSelectedSearchResultButton.SetBinding(ApplicationBarIconButton.CommandProperty, new Binding("CommandPinSelectedSearchResult") {Mode = BindingMode.OneTime}); SetBinding(SelectedManagementSectionProperty, new Binding("SelectedManagementSection") {Mode = BindingMode.TwoWay}); }
/// <summary> /// Retrieve the feed selected by the user and all it's corresponding articles. /// </summary> protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); string idStr; if (NavigationContext.QueryString.TryGetValue("id", out idStr)) { SelectedFeed = App.DataBaseUtility.QueryFeed(Convert.ToInt32(idStr)); _allFeedsArticles = App.DataBaseUtility.GetFeedArticles(Convert.ToInt32(idStr)); List <Article> firstSetOfArticles = new List <Article>(_allFeedsArticles); if (firstSetOfArticles.Count > 10) { firstSetOfArticles.RemoveRange(10, firstSetOfArticles.Count - 10); } FeedArticles = new ObservableCollection <Article>(firstSetOfArticles); DataContext = FeedArticles; } _allFeeds = App.DataBaseUtility.GetAllFeeds(); _allFeeds.Sort(); ApplicationBar appBar = new ApplicationBar { IsMenuEnabled = false }; int index = _allFeeds.IndexOf(SelectedFeed); _previousButton = new ApplicationBarIconButton { IconUri = new Uri("/Icons/appbar.back.rest.png", UriKind.Relative), Text = AppResources.AppBarButtonPreviousText, IsEnabled = (index > 0) }; _previousButton.Click += OnPreviousClick; _nextButton = new ApplicationBarIconButton { IconUri = new Uri("/Icons/appbar.next.rest.png", UriKind.Relative), Text = AppResources.AppBarButtonNextText, IsEnabled = (index < _allFeeds.Count - 1) }; _nextButton.Click += OnNextClick; appBar.Buttons.Add(_previousButton); appBar.Buttons.Add(_nextButton); this.ApplicationBar = appBar; }
private static void PopulateAppBarIconButtons(ApplicationBarCommandBindingBehavior sender) { var page = sender.Page; if (page == null) { return; } var ApplicationBar = page.ApplicationBar; if (ApplicationBar == null) { return; } var collection = sender.Buttons; if (collection == null) { return; } for (int i = 0; i < ApplicationBar.Buttons.Count; i++) { ApplicationBar.Buttons.RemoveAt(ApplicationBar.Buttons.Count - i - 1); } foreach (var item in collection) { var newapbtn = new ApplicationBarIconButton(item.IconUri) { IsEnabled = item.IsEnabled, Text = item.Text }; newapbtn.Click += (o, e) => { if (item.BindingCommand != null) { if (item.BindingCommand.CanExecute(null)) { item.BindingCommand.Execute(null); } } }; item.Core = newapbtn; ApplicationBar.Buttons.Add(newapbtn); item.PageContext = page; } }
/// <summary> /// Starts the test run. /// </summary> private void StartTestRun() { //TagEditorHolder.Visibility = Visibility.Collapsed; //TestExecution.Visibility = Visibility.Visible; // Configure the Application Bar buttons. UIElement rootVisual = Application.Current.RootVisual; if (rootVisual is PhoneApplicationFrame) { IApplicationBar appBar; PhoneApplicationPage mainPage = (((PhoneApplicationFrame)rootVisual).Content as PhoneApplicationPage); // The test project should not have an app bar configured // if so, replace it. appBar = new ApplicationBar(); mainPage.ApplicationBar = appBar; appBar.IsMenuEnabled = false; _emailButton = new ApplicationBarIconButton(); _emailButton.IconUri = new Uri("/Toolkit.Content/appbar.feature.email.rest.png", UriKind.Relative); _emailButton.Text = "email"; _emailButton.Click += OnEmailResultsButtonClick; _emailButton.IsEnabled = false; _saveButton = new ApplicationBarIconButton(); _saveButton.IconUri = new Uri("/Toolkit.Content/appbar.save.rest.png", UriKind.Relative); _saveButton.Text = "save"; _saveButton.Click += OnSaveResultsButtonClick; _saveButton.IsEnabled = false; appBar.Buttons.Add(_emailButton); appBar.Buttons.Add(_saveButton); } if (!(DataContext is TestRunData)) { _model = DataManager.Create(_harness); _model.Hook(); DataContext = _model.Data; _harness.TestHarnessCompleted += OnTestHarnessCompleted; } _harness.Run(); RunningTestPanel.Visibility = System.Windows.Visibility.Visible; RunningTestProgress.IsIndeterminate = true; }
// Constructor public MainPage() { InitializeComponent(); // create application bar instance ApplicationBar = new ApplicationBar(); // create new button ApplicationBarIconButton Newpage = new ApplicationBarIconButton(); // add image to button Newpage.IconUri = new Uri("/images/new.png", UriKind.Relative); // add text to button Newpage.Text = "New"; // add button to application bar ApplicationBar.Buttons.Add(Newpage); // add delete button ApplicationBarIconButton Delete = new ApplicationBarIconButton(); Delete.IconUri = new Uri("/images/delete.png", UriKind.Relative); Delete.Text = "Delete"; ApplicationBar.Buttons.Add(Delete); // add save button ApplicationBarIconButton Save = new ApplicationBarIconButton(); Save.IconUri = new Uri("/images/save.png", UriKind.Relative); Save.Text = "Save"; ApplicationBar.Buttons.Add(Save); // add cancel button ApplicationBarIconButton Cancel = new ApplicationBarIconButton(); Cancel.IconUri = new Uri("/images/cancel.png", UriKind.Relative); Cancel.Text = "Cancel"; ApplicationBar.Buttons.Add(Cancel); // create menu items for AppBar ApplicationBarMenuItem Share = new ApplicationBarMenuItem(); Share.Text = "Share via...."; ApplicationBar.MenuItems.Add(Share); ApplicationBarMenuItem Contacts = new ApplicationBarMenuItem(); Contacts.Text = "Contact us through +25477547629"; ApplicationBar.MenuItems.Add(Contacts); ApplicationBarMenuItem Website = new ApplicationBarMenuItem(); Website.Text = "Visit us on www.smn.com"; ApplicationBar.MenuItems.Add(Website); }
void TagEditor_Loaded(object sender, RoutedEventArgs e) { // trace event TraceHelper.AddMessage("TagEditor: Loaded"); ConnectedIconImage.DataContext = App.ViewModel; LayoutRoot.DataContext = App.ViewModel; string tagIDString = ""; if (NavigationContext.QueryString.TryGetValue("ID", out tagIDString)) { if (tagIDString == "new") { // new tag tagCopy = new Tag(); TitlePanel.DataContext = tagCopy; } else { Guid tagID = new Guid(tagIDString); tag = App.ViewModel.Tags.Single <Tag>(tl => tl.ID == tagID); // make a deep copy of the tag for local binding tagCopy = new Tag(tag); TitlePanel.DataContext = tagCopy; // add the delete button to the ApplicationBar var button = new ApplicationBarIconButton() { Text = "Delete", IconUri = new Uri("/Images/appbar.delete.rest.png", UriKind.Relative) }; button.Click += new EventHandler(DeleteButton_Click); // insert after the save button but before the cancel button ApplicationBar.Buttons.Add(button); } } ColorListPicker.ItemsSource = App.ViewModel.Constants.Colors; ColorListPicker.DisplayMemberPath = "Name"; try { BuiltSteady.Zaplify.Devices.ClientEntities.Color color = App.ViewModel.Constants.Colors.Single(c => c.ColorID == tagCopy.ColorID); ColorListPicker.SelectedIndex = App.ViewModel.Constants.Colors.IndexOf(color); } catch (Exception) { } //ColorListPicker.ExpansionMode = ExpansionMode.FullScreenOnly; }
protected override AnimatorHelperBase GetAnimation(AnimationType animationType, Uri toOrFrom) { ListBox list = lstFriends; if (pivot.SelectedIndex == 1) { list = lstFavorites; } else if (pivot.SelectedIndex == 2) { list = lstUsers; } if (animationType == AnimationType.NavigateForwardIn || animationType == AnimationType.NavigateBackwardIn) { return(null); } else { return new TurnstileFeatherBackwardOutAnimator() { ListBox = list, RootElement = LayoutRoot } }; } void buildApplicationBar() { ApplicationBar.Buttons.Clear(); if (pivot.SelectedIndex == 2) { ApplicationBarIconButton button1 = new ApplicationBarIconButton(new Uri("/icons/appbar.download.rest.png", UriKind.Relative)); button1.Click += new EventHandler(btnMore_Click); button1.Text = ApplicationStrings.AppBarButton_More; ApplicationBar.Buttons.Add(button1); button1 = new ApplicationBarIconButton(new Uri("/icons/appbar.feature.search.rest.png", UriKind.Relative)); button1.Click += new EventHandler(btnFilter_Click); button1.Text = ApplicationStrings.AppBarButton_Search; ApplicationBar.Buttons.Add(button1); } else { ApplicationBarIconButton button1 = new ApplicationBarIconButton(new Uri("/icons/appbar.refresh.rest.png", UriKind.Relative)); button1.Click += new EventHandler(btnRefresh_Click); button1.Text = ApplicationStrings.AppBarButton_Refresh; ApplicationBar.Buttons.Add(button1); } updateApplicationBarButtons(); }
protected override void HandleOnNavigatedTo(NavigationEventArgs e) { base.HandleOnNavigatedTo(e); if (this._isInitialized) return; InformationViewModel viewModel = new InformationViewModel(long.Parse(((Page)this).NavigationContext.QueryString["CommunityId"])); ((FrameworkElement)this).DataContext = viewModel; ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton(); Uri uri1 = new Uri("/Resources/check.png", UriKind.Relative); applicationBarIconButton1.IconUri = uri1; string appBarMenuSave = CommonResources.AppBarMenu_Save; applicationBarIconButton1.Text = appBarMenuSave; int num = 0; applicationBarIconButton1.IsEnabled = (num != 0); ApplicationBarIconButton appBarButtonSave = applicationBarIconButton1; ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton(); Uri uri2 = new Uri("/Resources/appbar.cancel.rest.png", UriKind.Relative); applicationBarIconButton2.IconUri = uri2; string appBarCancel = CommonResources.AppBar_Cancel; applicationBarIconButton2.Text = appBarCancel; ApplicationBarIconButton applicationBarIconButton3 = applicationBarIconButton2; appBarButtonSave.Click += ((EventHandler)((p, f) => { ((Control)this).Focus(); viewModel.SaveChanges(); })); applicationBarIconButton3.Click += ((EventHandler)((p, f) => Navigator.Current.GoBack())); this.ApplicationBar = ((IApplicationBar)ApplicationBarBuilder.Build(new Color?(), new Color?(), 0.9)); viewModel.PropertyChanged += (PropertyChangedEventHandler)((p, f) => appBarButtonSave.IsEnabled = (viewModel.IsFormEnabled && viewModel.IsFormCompleted)); this.ApplicationBar.Buttons.Add(appBarButtonSave); this.ApplicationBar.Buttons.Add(applicationBarIconButton3); InformationViewModel informationViewModel1 = viewModel; InformationViewModel expr_148 = viewModel; expr_148.OnTextBoxGotFocus = (RoutedEventHandler)Delegate.Combine(expr_148.OnTextBoxGotFocus, new RoutedEventHandler((object o, RoutedEventArgs args) => { this.TextBoxPanel.IsOpen = true; Point relativePosition = ((FrameworkElement)o).GetRelativePosition(this.ViewerContent); this.Viewer.ScrollToOffsetWithAnimation(relativePosition.Y - 38.0, 0.2, false); })); InformationViewModel expr_16F = viewModel; expr_16F.OnTextBoxLostFocus = (RoutedEventHandler)Delegate.Combine(expr_16F.OnTextBoxLostFocus, new RoutedEventHandler((object o, RoutedEventArgs args) => { this.TextBoxPanel.IsOpen = false; })); viewModel.Reload(true); this._isInitialized = true; }
private void BuildLocalizedApplicationBar() { ApplicationBar = new ApplicationBar(); ApplicationBarIconButton markUnreadButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/save.png", UriKind.Relative)); markUnreadButton.Text = AppResources.MarkUnreadText; ApplicationBar.Buttons.Add(markUnreadButton); markUnreadButton.Click += MarkUnreadClick; ApplicationBarIconButton labelsButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/folder.png", UriKind.Relative)); labelsButton.Text = AppResources.LabelsButtonText; ApplicationBar.Buttons.Add(labelsButton); labelsButton.Click += EditLabelsClick; // TODO: Hide if this conversation is not in the inbox? ApplicationBarIconButton archiveButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/download.png", UriKind.Relative)); archiveButton.Text = AppResources.ArchiveButtonText; ApplicationBar.Buttons.Add(archiveButton); archiveButton.Click += ArchiveClick; ApplicationBarIconButton replyAllButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.reply.email.png", UriKind.Relative)); replyAllButton.Text = AppResources.ReplyAllButtonText; ApplicationBar.Buttons.Add(replyAllButton); replyAllButton.Click += ReplyAll; ApplicationBarMenuItem replyMenuItem = new ApplicationBarMenuItem(AppResources.ReplyButtonText); ApplicationBar.MenuItems.Add(replyMenuItem); replyMenuItem.Click += Reply; ApplicationBarMenuItem forwardMenuItem = new ApplicationBarMenuItem(AppResources.ForwardButtonText); ApplicationBar.MenuItems.Add(forwardMenuItem); forwardMenuItem.Click += Forward; // TODO: Change to 'delete' in the Trash folder? ApplicationBarMenuItem trashMenuItem = new ApplicationBarMenuItem(AppResources.TrashButtonText); ApplicationBar.MenuItems.Add(trashMenuItem); trashMenuItem.Click += TrashClick; // TODO: Hide when in the spam folder? ApplicationBarMenuItem spamMenuItem = new ApplicationBarMenuItem(AppResources.SpamButtonText); ApplicationBar.MenuItems.Add(spamMenuItem); spamMenuItem.Click += SpamClick; }
private void InitAppBarSeasons() { try { if (this.Show != null && this.Show.Seasons != null) { ApplicationBar appBar = new ApplicationBar(); ApplicationBarIconButton previousSeason = new ApplicationBarIconButton(new Uri("Images/appbar.back.rest.png", UriKind.Relative)); previousSeason.Click += new EventHandler(ApplicationBarIconButton_Click_EpisodeBack); previousSeason.Text = "Previous"; if (this.Show.Seasons.Count() == 1) { previousSeason.IsEnabled = false; } appBar.Buttons.Add(previousSeason); CreateSeasonsWatchedButton(appBar); ApplicationBarIconButton showSeasons = new ApplicationBarIconButton(new Uri("Images/appbar.phone.numbersign.rest.png", UriKind.Relative)); showSeasons.Click += new EventHandler(showSeasons_Click); showSeasons.Text = "Seasons"; if (this.Show.Seasons.Count() == 1) { showSeasons.IsEnabled = false; } appBar.Buttons.Add(showSeasons); ApplicationBarIconButton nextSeason = new ApplicationBarIconButton(new Uri("Images/appbar.next.rest.png", UriKind.Relative)); nextSeason.Click += new EventHandler(ApplicationBarIconButton_Click_EpisodeForward); nextSeason.Text = "Next"; appBar.Buttons.Add(nextSeason); if (this.Show.Seasons.Count() == 1) { nextSeason.IsEnabled = false; } CreateRefreshSeasonButton(appBar); this.ApplicationBar = appBar; } } catch (NullReferenceException) { //DO NOTHING } }
public SettingsPage() { InitializeComponent(); appSettings = IsolatedStorageSettings.ApplicationSettings; ApplicationBar = new ApplicationBar(); ApplicationBarIconButton saveAppBarButton = new ApplicationBarIconButton(new Uri("/Assets/save.png", UriKind.Relative)); saveAppBarButton.Text = Omeddle.Resources.AppResources.SaveText; saveAppBarButton.Click += saveAppBarButton_Click; ApplicationBar.Buttons.Add(saveAppBarButton); }
private void BuildAppBar() { ApplicationBarIconButton applicationBarIconButton1 = new ApplicationBarIconButton(new Uri("/Resources/appbar.add.rest.png", UriKind.Relative)); applicationBarIconButton1.Click += (new EventHandler(this.appBarButtonAdd_Click)); applicationBarIconButton1.Text = CommonResources.AppBar_Add; this._appBarConversations.Buttons.Add(applicationBarIconButton1); ApplicationBarIconButton applicationBarIconButton2 = new ApplicationBarIconButton(new Uri("/Resources/appbar.feature.search.rest.png", UriKind.Relative)); applicationBarIconButton2.Text = CommonResources.AppBar_Search; this._appBarConversations.Buttons.Add(applicationBarIconButton2); applicationBarIconButton2.Click += (new EventHandler(this.appBarButtonSearch_Click)); this.ApplicationBar = ((IApplicationBar)this._appBarConversations); }
private void BuildLocalizedApplicationBarDelete() { _DeleteButtonVisible = true; _SaveButtonVisible = false; //remove buttons ApplicationBar.Buttons.Remove(appBarButtonEdit); ApplicationBar.Buttons.Remove(appBarButtonHome); //create a new button. delete appBarButtonDelete = new ApplicationBarIconButton(new Uri("/Assets/AppBar/delete.png", UriKind.Relative)); appBarButtonDelete.Text = "delete"; ApplicationBar.Buttons.Add(appBarButtonDelete); appBarButtonDelete.Click += appBarButtonDelete_Click; }
private void BuildLocalizedApplicationBar() { // Set the page's ApplicationBar to a new instance of ApplicationBar. ApplicationBar = new ApplicationBar(); ApplicationBar.BackgroundColor = _vm.BgColor; ApplicationBar.ForegroundColor = _vm.FgColor; // Create a new button and set the text value to the localized string from AppResources. ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/appbar.save.png", UriKind.Relative)); appBarButton.Text = "save"; appBarButton.Click += ApplicationBarIconButton_Click; ApplicationBar.Buttons.Add(appBarButton); }
private void PrepareApplicationBar() { ApplicationBar = new ApplicationBar(); ApplicationBar.IsMenuEnabled = false; ApplicationBarIconButton helpButton = new ApplicationBarIconButton(new Uri("/Resources/OriginalPlatformIcons/appbar.questionmark.rest.png", UriKind.Relative)); helpButton.Click += NavigateToHelpView; helpButton.Text = FileLanguage.HELP; ApplicationBar.PopulateWithButtons(new ApplicationBarIconButton[] { helpButton }); }
//--------------------------------------------------------------------------------------------------------------------------------- //ApplicationBar schneiden erstellen //--------------------------------------------------------------------------------------------------------------------------------- void AppBar02() { //neue AppBar anlegen ApplicationBar = new ApplicationBar(); ApplicationBar.IsMenuEnabled = true; ApplicationBar.IsVisible = true; //AppBar Buttons anlegen ApplicationBarIconButton button0 = new ApplicationBarIconButton(new Uri("/Images/appbar.cut.png", UriKind.Relative)); button0.Text = Lockscreen_Swap.AppResx.Z01_Cut; ApplicationBar.Buttons.Add(button0); //AppBar Button drehen links ApplicationBarIconButton button1 = new ApplicationBarIconButton(new Uri("/Images/appbar.rotate.counterclockwise.png", UriKind.Relative)); button1.Text = Lockscreen_Swap.AppResx.Z03_Left; ApplicationBar.Buttons.Add(button1); //AppBar Button drehen rechts ApplicationBarIconButton button2 = new ApplicationBarIconButton(new Uri("/Images/appbar.rotate.clockwise.png", UriKind.Relative)); button2.Text = Lockscreen_Swap.AppResx.Z03_Right; ApplicationBar.Buttons.Add(button2); //AppBar Menü Items anlegen ApplicationBarMenuItem item0 = new ApplicationBarMenuItem(Lockscreen_Swap.AppResx.Z01_Cut); ApplicationBar.MenuItems.Add(item0); //AppBar Menü Items drehen links ApplicationBarMenuItem item1 = new ApplicationBarMenuItem(Lockscreen_Swap.AppResx.Z03_RotateLeft); ApplicationBar.MenuItems.Add(item1); //AppBar Menü Items drehen rechts ApplicationBarMenuItem item2 = new ApplicationBarMenuItem(Lockscreen_Swap.AppResx.Z03_RotateRight); ApplicationBar.MenuItems.Add(item2); //AppBar Funktionen festlegen (ApplicationBar.Buttons[0] as ApplicationBarIconButton).Click += BtnCut; (ApplicationBar.Buttons[1] as ApplicationBarIconButton).Click += BtnRotateLeft; (ApplicationBar.Buttons[2] as ApplicationBarIconButton).Click += BtnRotateRight; //AppMenü Funktionen festlegen (ApplicationBar.MenuItems[0] as ApplicationBarMenuItem).Click += BtnCut; (ApplicationBar.MenuItems[1] as ApplicationBarMenuItem).Click += BtnRotateLeft; (ApplicationBar.MenuItems[2] as ApplicationBarMenuItem).Click += BtnRotateRight; }
/// <summary> /// Initializes a new instance of the TagEditor type. /// </summary> public TagEditor() { Microsoft.Phone.Controls.LocalizedResources.ControlResources.Culture = CultureInfo.InvariantCulture; InitializeComponent(); // Get the tag history List <string> history; IsolatedStorageSettings.ApplicationSettings.TryGetValue(TagHistoryKey, out history); TagHistory = history; if (TagHistory == null) { TagHistory = new List <string>(); } // Fill in the history list if (TagHistory.Count > 0) { // Show the Tag history list in reverse order (recently added entries first) for (int i = TagHistory.Count - 1; i > -1; i--) { SuggestionsListBox.Items.Insert(0, CreateSuggestedTag(TagHistory[i])); } } // Configure the Application Bar button. UIElement rootVisual = Application.Current.RootVisual; if (rootVisual is PhoneApplicationFrame) { IApplicationBar appBar; PhoneApplicationPage mainPage = (((PhoneApplicationFrame)rootVisual).Content as PhoneApplicationPage); // Replace the application bar. appBar = new ApplicationBar(); mainPage.ApplicationBar = appBar; appBar.IsMenuEnabled = false; _runButton = new ApplicationBarIconButton(); _runButton.IconUri = new Uri("/Toolkit.Content/appbar.transport.play.rest.png", UriKind.Relative); _runButton.Text = "run tests"; _runButton.Click += OnRunButtonClick; _runButton.IsEnabled = true; appBar.Buttons.Add(_runButton); } }
private void BuildApplicationBar() { // Set the page's ApplicationBar to a new instance of ApplicationBar ApplicationBar = new ApplicationBar(); ApplicationBar.ForegroundColor = (App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color; ApplicationBar.BackgroundColor = (App.Current.Resources["PhoneForegroundBrush"] as SolidColorBrush).Color; _appBarSaveResuktButton = new ApplicationBarIconButton(new Uri("/View/icons/SaveResultIcon.png", UriKind.Relative)); _appBarSaveResuktButton.Text = Languages.AppResources.fillingSurveyPage_OnSaveResultTitle; _appBarSaveResuktButton.Click += OnSaveResult; _appBarSaveResuktButton.IsEnabled = false; ApplicationBar.Buttons.Add(_appBarSaveResuktButton); }
private void CreateAppBar() { ApplicationBar = new ApplicationBar(); ApplicationBar.IsVisible = false; var removeButton = new ApplicationBarIconButton(new Uri("/Assets/Icons/delete.png", UriKind.Relative)) { Text = AppResources.DeleteCheatButtonText }; removeButton.Click += removeButton_Click; ApplicationBar.Buttons.Add(removeButton); }
private void BuildLocalizedApplicationBar() { ApplicationBar = new ApplicationBar(); // // Crear un nuevo botón y establecer el valor de texto en la cadena traducida de AppResources. ApplicationBarIconButton registerButton = new ApplicationBarIconButton(new Uri("/Assets/Icons/add.png", UriKind.Relative)); registerButton.Text = "Registro"; registerButton.Click += registerButton_Click; ApplicationBar.Buttons.Add(registerButton); }
private void quick_Click(object sender, EventArgs e) { m_button = ApplicationBar.Buttons[1] as ApplicationBarIconButton; if (sending.Visibility == Visibility.Collapsed) { m_button.Text = "cevapla"; sending.Visibility = Visibility.Visible; } else { if (message.Text.Replace(" ", "") != "") { if (can_reply == "1") { //interneti kontrol ettiriyoruz if (classes.General.CheckNetwork() == "Fail") { return; } //butonu deaktif ediyoruz tekrar tekrar basilmamasi icin m_button.IsEnabled = false; message.IsEnabled = false; current_page = 0; isLikeOrQuick = 0; isPostSended = 1; message.Text = message.Text.Replace("\r", "\n"); //parametre listesini temizliyoruz classes.General.general_list.Clear(); classes.General.general_list.Add(sforum_id); classes.General.general_list.Add(topic_id); classes.General.general_list.Add("base64|"); classes.General.general_list.Add("base64|" + classes.General.EncodeBase64(message.Text)); //General.general_list.Add("base64|" + General.EncodeBase64(message.Text + Environment.NewLine + Environment.NewLine + "[SIZE=2]" + App.Session_LoadSession("OwnSign") + "[/SIZE]")); //apiyi cagirma komutunu kullaniyoruz classes.Oauth.XmlRpcExecMethod("reply_post", hCompleted); } else { MessageBox.Show("Bu konuya yanıt yazma yetkiniz yok veya konu kilitli."); } } } }
private void buildLocalizedApplicationBar() { ApplicationBarIconButton editButton = new ApplicationBarIconButton(new Uri("/Assets/Images/Edit.png", UriKind.Relative)); editButton.Text = AppResources.AppBarEditText; editButton.Click += EditWine_Click; ApplicationBar.Buttons.Add(editButton); ApplicationBarIconButton deleteButton = new ApplicationBarIconButton(new Uri("/Assets/Images/Delete.png", UriKind.Relative)); deleteButton.Text = AppResources.AppBarDeleteText; deleteButton.Click += DeleteWine_Click; ApplicationBar.Buttons.Add(deleteButton); }
private void SetUpApplicationBar() { ApplicationBar.Mode = ApplicationBarMode.Default; ApplicationBar.IsMenuEnabled = false; ApplicationBar.Mode = ApplicationBarMode.Minimized; ApplicationBarIconButton check = new ApplicationBarIconButton(); check.IconUri = new Uri("/AppBarIcons/appbar.questionmark.rest.png", UriKind.Relative); check.Text = "zeigen"; check.Click += validateInputs; ApplicationBar.Buttons.Add(check); }
public TodoPage() { InitializeComponent(); this.TodoPageModel = new TodoPageModel(); this.DataContext = this.TodoPageModel; this.deleteButton = new ApplicationBarIconButton() { Text = "Delete", IconUri = new Uri("/Assets/appbar.delete.png", UriKind.Relative), IsEnabled = false }; this.deleteButton.Click += DeleteTodoItemButton_Click; ApplicationBar.Buttons.Add(deleteButton); }
private void InitializeMenu() { ApplicationBar = new ApplicationBar(); ApplicationBarIconButton menuSave = new ApplicationBarIconButton(); menuSave.IconUri = new Uri(Globals.IconUri_Save, UriKind.Relative); menuSave.Text = "Save"; menuSave.Click += (sender, args) => { LocationService.MacAddress = macTextBox.Text; this.NavigationService.GoBack(); }; ApplicationBar.Buttons.Add(menuSave); }
internal static ApplicationBarIconButton AddApplicationBarButton(IApplicationBar bar, string imageUrl, string buttonName, EventHandler action = null) { var applicationBarIconButton = new ApplicationBarIconButton(new Uri(imageUrl, UriKind.Relative)) { Text = buttonName }; if (action != null) { applicationBarIconButton.Click += action; } bar.Buttons.Add(applicationBarIconButton); return(applicationBarIconButton); }
private void ConfigureUploadButton() { if (App.IsWP8) { var upload = new ApplicationBarIconButton() { Text = "upload", IconUri = new Uri("Assets/AppBar/appbar.upload.rest.png", UriKind.Relative) }; upload.Click += upload_Click; this.ReplyAppBar.Buttons.Insert(1, upload); } }
protected ApplicationBarIconButton AddApplicationBarIconButton(string buttonText, Uri buttonIcon, Action a) { InitializeApplicationBar(true); ApplicationBarIconButton button = new ApplicationBarIconButton(); button.Text = buttonText; button.IconUri = buttonIcon; button.Click += (sender, e) => a(); ApplicationBar.Buttons.Add(button); return(button); }
private void BuildLocalizedApplicationBar() { ApplicationBar = new ApplicationBar(); ApplicationBarIconButton appBarSave = new ApplicationBarIconButton(new Uri("/Assets/AppBar/save.png", UriKind.Relative)); appBarSave.Text = AppResources.ContextMenuSave; ApplicationBar.Buttons.Add(appBarSave); appBarSave.Click += (sender, e) => { bool result = Utils.SavePictureInMediaLibrary(_fileName); MessageBox.Show(result ? AppResources.FileSavingSuccess : AppResources.FileSavingFailure, AppResources.FileSaving, MessageBoxButton.OK); }; }
// 내부 함수 private void InitializeApplicationBar() { favoriteApplicationBar = new ApplicationBar(); allApplicationBar = new ApplicationBar(); ApplicationBarIconButton refreshListIconButton = new ApplicationBarIconButton(); refreshListIconButton.IconUri = new Uri("/Data/appbar.refresh.rest.png", UriKind.Relative); refreshListIconButton.Click += RefreshGalleryListButton_Click; refreshListIconButton.Text = "새로고침"; allApplicationBar.Buttons.Add(refreshListIconButton); settingApplicationBar = new ApplicationBar(); }
public JobDetailPage() { InitializeComponent(); detailJob = (App.Current as App).CurrentJob; btn0 = (ApplicationBarIconButton)ApplicationBar.Buttons[0]; btn2 = (ApplicationBarIconButton)ApplicationBar.Buttons[2]; btn2.Text = detailJob.CollectBtnText; btn0.IsEnabled = detailJob.IsPathAvailable; if (string.IsNullOrEmpty(detailJob.OfficalWeibo)) { tb_relativeWeiboEmpty.Visibility = Visibility.Visible; relativeWeiboListBox.Visibility = Visibility.Collapsed; } }