protected override void PrepareAppBarMap() { AppBarModelList = new List <ApplicationBarModel>(); ApplicationBarModel appBarModel; if (LineItemSummaryDetails.Permissions.Reject || LineItemSummaryDetails.Permissions.Adjust) { appBarModel = new ApplicationBarModel(); appBarModel.IconPath = Constants.ActionItemIconPath; appBarModel.IsEnabled = true; appBarModel.ButtonText = Constants.ActionItemTitle; AppBarModelList.Add(appBarModel); } appBarModel = new ApplicationBarModel(); appBarModel.IconPath = Constants.LeftArrowIconPath; appBarModel.IsEnabled = !IsFirstItem(); appBarModel.ButtonText = Constants.LeftArrowTitle; AppBarModelList.Add(appBarModel); appBarModel = new ApplicationBarModel(); appBarModel.IconPath = Constants.RightArrowIconPath; appBarModel.IsEnabled = !IsLastItem(); appBarModel.ButtonText = Constants.RightArrowTitle; AppBarModelList.Add(appBarModel); }
protected override void OnAppBarButtonClick(ApplicationBarModel appBarModel) { if (PageInProgress) { return; } switch (appBarModel.IconPath) { case Constants.ActionItemIconPath: OnActionItem(); break; case Constants.LeftArrowIconPath: OnLeftArrow(); break; case Constants.RightArrowIconPath: OnRightArrow(); break; case Constants.RejectIconPath: OnLineItemReject(); break; case Constants.AdjustIconPath: OnLineItemAdjust(); break; default: break; } }
protected override void OnAppBarButtonClick(ApplicationBarModel appBarModel) { if (PageInProgress) { return; } switch (appBarModel.IconPath) { case Constants.MultiSelectIconPath: OnMultiSelect(); break; case Constants.SearchIconPath: OnSearch(); break; case Constants.ApproveIconPath: OnApprove(); break; case Constants.RejectIconPath: OnReject(); break; default: break; } }
private ApplicationBarModel CreateAppBarIcon(string path, string title) { ApplicationBarModel appBarModel = new ApplicationBarModel(); appBarModel.IconPath = path; appBarModel.IsEnabled = false; appBarModel.ButtonText = title; return(appBarModel); }
private ApplicationBarIconButton CreateAppBarButton(ApplicationBarModel model) { ApplicationBarIconButton appButton = new ApplicationBarIconButton(new Uri(model.IconPath, UriKind.Relative)); appButton.Text = model.ButtonText; appButton.IsEnabled = model.IsEnabled; appButton.Click += appButton_Click; AppBarButtonMap.Add(model.IconPath, appButton); return(appButton); }
public void InsertAppBarButton(ApplicationBarModel model, int position) { ApplicationBarIconButton appButton; if (!AppBarButtonMap.ContainsKey(model.IconPath)) { appButton = CreateAppBarButton(model); AppBarModelList.Add(model); } else { appButton = AppBarButtonMap[model.IconPath]; appButton.IsEnabled = model.IsEnabled; } ApplicationBar.Buttons.Insert(position, appButton); }
protected override void PrepareAppBarMap() { AppBarModelList = new List <ApplicationBarModel>(); ApplicationBarModel appBarModel; if (UserData.Instance.InvoiceQuickActionsAccess) { appBarModel = new ApplicationBarModel(); appBarModel.IconPath = Constants.MultiSelectIconPath; appBarModel.IsEnabled = true; appBarModel.ButtonText = Constants.MultiSelectTitle; AppBarModelList.Add(appBarModel); } appBarModel = new ApplicationBarModel(); appBarModel.IconPath = Constants.SearchIconPath; appBarModel.IsEnabled = true; appBarModel.ButtonText = Constants.SearchTitle; AppBarModelList.Add(appBarModel); }
public void AddAppBarButton(ApplicationBarModel model) { InsertAppBarButton(model, ApplicationBar.Buttons.Count); }
protected virtual void OnAppBarButtonClick(ApplicationBarModel appBarModel) { }