• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# PhoneApplicationPage类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PhoneApplicationPage的典型用法代码示例。如果您正苦于以下问题:C# PhoneApplicationPage类的具体用法?C# PhoneApplicationPage怎么用?C# PhoneApplicationPage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PhoneApplicationPage类属于命名空间,在下文中一共展示了PhoneApplicationPage类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: BusyOverlay

        public BusyOverlay(bool closable, string content = null, bool hideAppBar = true)
        {
            _closable = closable;
            _page = (PhoneApplicationPage)((PhoneApplicationFrame)Application.Current.RootVisual).Content;
            _hideAppBar = hideAppBar;

            _popup = new RadWindow()
            {
                IsAnimationEnabled = false,
                IsClosedOnOutsideTap = false,
                Content = _border = new Border()
                {
                    Opacity = 0.5,
                    Width = _page.ActualWidth,
                    Height = _page.ActualHeight,
                    Background = new SolidColorBrush(_overlayBackgroundColor),
                    Child = new RadBusyIndicator()
                    {
                        IsRunning = true,
                        AnimationStyle = AnimationStyle.AnimationStyle9,
                        VerticalAlignment = VerticalAlignment.Center,
                        HorizontalAlignment = HorizontalAlignment.Stretch,
                        Content = content
                    }
                }
            };

        }
开发者ID:karbazol,项目名称:FBReaderCS,代码行数:28,代码来源:BusyOverlay.cs


示例2: VenueSearchViewModel

        public VenueSearchViewModel(PhoneApplicationPage page)
            : base(page)
        {
            this.Page = page;

            ViewOnMapCommand = new RelayCommand(DoViewOnMap, CanViewOnMap);
        }
开发者ID:travbod57,项目名称:DatingDiary,代码行数:7,代码来源:VenueSearchViewModel.cs


示例3: Go

        public static void Go(PhoneApplicationPage fromPage, Category category)
        {
            SelectionHandler = new PageActionHandler<Category>();
            SelectionHandler.AfterSelected = delegate(Category item)
            {
                if ((item != null) && (item.Id != category.ParentCategoryId))
                {
                    if (category.ParentCategory != null)
                    {
                        category.ParentCategory.Childrens.Remove(category);
                    }

                    category.ParentCategory = item;
                    if (item.Childrens.Count(p => p.Name == category.Name) == 0)
                    {
                        // reset order.
                        category.Order = item.Childrens
                            .Select(p => (int)p.Order).ToList().Max(p => p) + 1;

                        item.Childrens.Add(category);
                    }

                    ((System.Collections.Generic.IEnumerable<AccountItem>)category.AccountItems).ForEach<AccountItem>(p =>
                    {
                        p.RaisePropertyChangd("NameInfo");
                    });
                    ViewModelLocator.CategoryViewModel.Update(category);
                }
            };
            fromPage.NavigateTo("/pages/CategoryManager/SelectParentCategoryPage.xaml?id={0}&currentName={1}&type={2}&childName={3}", new object[] { category.ParentCategoryId, category.ParentCategory == null ? "N/A" : category.ParentCategory.Name, category.CategoryType, category.Name });
        }
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:31,代码来源:SelectParentCategoryPage.xaml.cs


示例4: PopupCotainer

 public PopupCotainer(PhoneApplicationPage basePage)
 {
     InitializeComponent();
     this.Loaded += new RoutedEventHandler(PopupCotainer_Loaded);
     _BasePage = basePage;
     _BasePage.BackKeyPress += BasePage_BackKeyPress;
 }
开发者ID:ziibinj,项目名称:DataEncryptWindowsPhoneDemo,代码行数:7,代码来源:PopupCotainer.xaml.cs


示例5: TriggerInvokesCallbacksAfterProcessingReceivedNotifications

        public void TriggerInvokesCallbacksAfterProcessingReceivedNotifications()
        {
            string notificationReceived = "Foo";
            var callbackInvoked = 0;
            var callbackCallsWhenNotificationIsHandled = 0;
            var page = new PhoneApplicationPage();
            var myNotificationAwareObject = new MyNotificationAwareClass();
            var binding = new Binding("InteractionRequest") { Source = myNotificationAwareObject, Mode = BindingMode.OneWay };
            var trigger = new MyTriggerClass
            {
                RequestBinding = binding,
                NotifyAction = c => { notificationReceived = c.Title; callbackCallsWhenNotificationIsHandled = callbackInvoked; }
            };
            Interaction.GetBehaviors(page).Add(trigger);
            var initialState = notificationReceived;
            myNotificationAwareObject.InteractionRequest.Raise(new Notification { Title = "Bar" }, n => callbackInvoked++);
            var barState = notificationReceived;
            myNotificationAwareObject.InteractionRequest.Raise(new Notification { Title = "Finish" }, n => callbackInvoked++);
            var finalState = notificationReceived;

            Assert.AreEqual("Foo", initialState);
            Assert.AreEqual("Bar", barState);
            Assert.AreEqual("Finish", finalState);
            Assert.AreEqual(2, callbackInvoked);
            Assert.AreEqual(1, callbackCallsWhenNotificationIsHandled);
        }
开发者ID:ssethi,项目名称:TestFrameworks,代码行数:26,代码来源:BindableInteractionRequestTriggerBaseFixture.cs


示例6: ClearApplicationBar

 public static void ClearApplicationBar(PhoneApplicationPage page)
 {
     while (page.ApplicationBar.Buttons.Count > 0)
     {
         page.ApplicationBar.Buttons.RemoveAt(0);
     }
 }
开发者ID:uvbs,项目名称:MyProjects,代码行数:7,代码来源:CommonUtils.cs


示例7: SignInPage

        protected internal SignInPage(PhoneApplicationPage page)
            : base(page)
        {
            SignIn = new SimpleActionCommand(_ => SelectServiceProvider.Execute(ClientData.VidyanoServiceProvider));
            RetryConnect = new SimpleActionCommand(async _ =>
            {
                if (State == SignInPageState.NoInternet)
                    await Connect();
            });
            SelectServiceProvider = new SimpleActionCommand(provider =>
            {
                selectedProvider = (ServiceProvider)provider;
                promptServiceProviderWaiter.Set();
            });

            Page.BackKeyPress += (_, e) =>
            {
                promptServiceProviderWaiter.Set();
                if (oauthBrowserWaiter != null)
                    oauthBrowserWaiter.Set();

                if (ClientData != null && !String.IsNullOrEmpty(ClientData.DefaultUserName))
                    e.Cancel = true;
            };
        }
开发者ID:stevehansen,项目名称:vidyano_v1,代码行数:25,代码来源:SignInPage.cs


示例8: ApplicationBarHelper

 public ApplicationBarHelper(PhoneApplicationPage targetPage)
 {
     this.textBoxs = new List<TextBox>();
     this.pageAttached = targetPage;
     this.OriginalBar = pageAttached.ApplicationBar;
     InitializeEditingBar();
 }
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:7,代码来源:ApplicationBarHelper.cs


示例9: CommandBehaviorMonitorsCanExecuteChangedToUpdateEnabledWhenCanExecuteChangedIsRaised

        public void CommandBehaviorMonitorsCanExecuteChangedToUpdateEnabledWhenCanExecuteChangedIsRaised()
        {
            var page = new PhoneApplicationPage();
            var bar = new ApplicationBar();
            var button = new ApplicationBarIconButton(new Uri("/foo.png", UriKind.Relative));
            button.Text = "Foo";
            bar.Buttons.Add(button);
            page.ApplicationBar = bar;
            var command = new ApplicationBarButtonCommand();
            command.ButtonText = "Foo";
            var bindingSource = new MyCommandHolder();
            command.CommandBinding = bindingSource.Command;
            Interaction.GetBehaviors(page).Add(command);

            bindingSource.CanExecute = true;

            var initialState = button.IsEnabled;

            bindingSource.CanExecute = false;

            var finalState = button.IsEnabled;

            Assert.IsTrue(initialState);
            Assert.IsFalse(finalState);
        }
开发者ID:selvendiranj,项目名称:compositewpf-copy,代码行数:25,代码来源:ApplicationBarButtonCommandFixture.cs


示例10: UpdateOrientation

        public void UpdateOrientation(PhoneApplicationPage page)
        {
            if (page == null) return;

            //BUG: Auto Rotate >> Landscape >> Disable Auto Rotate >> Still LandScape
            page.SupportedOrientations = Views.SettingView.IsAutoRotate ? SupportedPageOrientation.PortraitOrLandscape : SupportedPageOrientation.Portrait;
        }
开发者ID:5nophilwu,项目名称:S1Nyan,代码行数:7,代码来源:OrientationHelper.cs


示例11: HasSomeThingToDoBeforeGoToMainPage

        /// <summary>
        /// Determines whether [has some thing to do before go to main page].
        /// </summary>
        /// <returns>
        ///   <c>true</c> if [has some thing to do before go to main page]; otherwise, <c>false</c>.
        /// </returns>
        public static bool HasSomeThingToDoBeforeGoToMainPage(PhoneApplicationPage fromPage)
        {
            try
            {
                if (HasSomeThingToDo && App.SeniorVersion == "1530.1222")
                {
                    fromPage.BusyForWork(AppResources.UpgratingUnderProcess);

                    IsolatedAppSetingsHelper.ShowTipsByVerion("DoSomethingOnce", () =>
                    {
                        ViewModelLocator.ScheduleManagerViewModel.SetupPlanningFirstTime();
                        Repayment.UpdateTableStructureAtV1_9_8(ViewModelLocator.AccountBookDataContext, ViewModels.BorrowLeanManager.BorrowLeanViewModel.EnsureStatus);
                    });

                    fromPage.WorkDone();
                }

            }
            catch (Exception)
            {

            }

            return HasSomeThingToDo;
        }
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:31,代码来源:UpdatingController.cs


示例12: Insert

 private void Insert()
 {
     // Make an assumption that this is within a phone application that is developed "normally"
     var frame = Application.Current.RootVisual as Microsoft.Phone.Controls.PhoneApplicationFrame;
     _page = frame.Content as PhoneApplicationPage;
     _page.BackKeyPress += Page_BackKeyPress;
     // assume the child is a Grid, span all of the rows
     var grid = System.Windows.Media.VisualTreeHelper.GetChild(_page, 0) as Grid;
     if (grid.RowDefinitions.Count > 0)
     {
         Grid.SetRowSpan(this, grid.RowDefinitions.Count);
     }
     grid.Children.Add(this);
     // Create a transition like the regular MessageBox
     SwivelTransition transitionIn = new SwivelTransition();
     transitionIn.Mode = SwivelTransitionMode.BackwardIn;
     // Transition only the MessagePanel
     ITransition transition = transitionIn.GetTransition(MessagePanel);
     transition.Completed += (s, e) => transition.Stop();
     transition.Begin();
     if (_page.ApplicationBar != null)
     {
         // Hide the app bar so they cannot open more message boxes
         _page.ApplicationBar.IsVisible = false;
     }
 }
开发者ID:richardaum,项目名称:Metroist-for-Windows-Phone,代码行数:26,代码来源:MessageBox.xaml.cs


示例13: RestoreState

        public static void RestoreState(PhoneApplicationPage page)
        {
            foreach (PropertyInfo tombstoneProperty in FindTombstoneProperties(page.DataContext))
            {
                string key = "ViewModel." + tombstoneProperty.Name;

                if (page.State.ContainsKey(key))
                {
                    tombstoneProperty.SetValue(page.DataContext, page.State[key], null);
                }
            }

            if (page.State.ContainsKey("FocusedControl.Name"))
            {
                string focusedControlName = (string)page.State["FocusedControl.Name"];
                Control focusedControl = (Control)page.FindName(focusedControlName);

                if (focusedControl != null)
                {
                    page.Loaded += delegate
                    {
                        focusedControl.Focus();
                    };
                }
            }
        }
开发者ID:pieterderycke,项目名称:CloudFox,代码行数:26,代码来源:TombstoneHelper.cs


示例14: Hide

        internal static void Hide(PhoneApplicationPage page)
        {
            SystemTray.SetIsVisible(page, false);
            SystemTray.SetOpacity(page, 1);
            SystemTray.SetProgressIndicator(page, null);

        }
开发者ID:JulianMH,项目名称:DoIt,代码行数:7,代码来源:SystemTrayHelper.cs


示例15: CEDateViewModel

        public CEDateViewModel(PhoneApplicationPage page, int? dateId = null)
            : base(page)
        {
            DateRep = new Repository<Date>(this.Ctx);
            VenueRep = new Repository<Venue>(this.Ctx);

            this.IsEditing = dateId.HasValue;

            if (this.IsEditing)
            {
                this.TheDate = Ctx.Dates.Where(x => x.Id == dateId).SingleOrDefault();
                this.ThePerson = this.TheDate.Person;
                this.TheVenue = this.TheDate.Venue;

                this.Date = DateTime.Parse(this.TheDate.DateOfMeeting.ToShortDateString());
                this.Time = this.Date + this.TheDate.DateOfMeeting.TimeOfDay;
            }
            else
            {
                this.TheDate = new Date();
                this.TheVenue = new Venue();

                this.Date = DateTime.Parse(DateTime.Now.ToShortDateString());
                this.Time = this.Date + DateTime.Now.TimeOfDay;
            }

            this.People = new List<CustomListBoxItem<Person>>();
            this.People.Add(new CustomListBoxItem<Person>() { Key = -1, Value = "Choose ...", Item = null, ShowItem = Visibility.Collapsed });
            this.People.AddRange((from p in Ctx.Persons orderby p.FirstName ascending select new CustomListBoxItem<Person>() { Key = p.Id, Value = p.FullName, Item = p, ShowItem = Visibility.Visible }).ToList());

            // the first one is the Choose item
            foreach (CustomListBoxItem<Person> person in this.People.Skip(1))
                person.Image = Storage.ReadImageFromIsolatedStorageToWriteableBitmap(string.Format("ProfileThumbnail\\{0}", person.Item.FileName));
        }
开发者ID:travbod57,项目名称:DatingDiary,代码行数:34,代码来源:CEDateViewModel.cs


示例16: Init

        public void Init(WebBrowser browser, PhoneApplicationPage appMainPage)
        {
            initAppUrls();
            RhoLogger.InitRhoLog();
            LOG.INFO("Init");

            CRhoFile.recursiveCreateDir(CFilePath.join(getBlobsDirPath()," "));

            m_webBrowser = browser;
            m_appMainPage = appMainPage;
            m_appMainPage.ApplicationBar = null;
            m_httpServer = new CHttpServer(CFilePath.join(getRhoRootPath(), "apps"));
            CRhoResourceMap.deployContent();
            RhoRuby.Init(m_webBrowser);

            DBAdapter.initAttrManager();

            LOG.INFO("Starting sync engine...");
            SyncThread sync = null;
            try{
	        	sync = SyncThread.Create();
	        	
	        }catch(Exception exc){
	        	LOG.ERROR("Create sync failed.", exc);
	        }
	        if (sync != null) {
	        	//sync.setStatusListener(this);
	        }
	        
	        RhoRuby.InitApp();
	        RhoRuby.call_config_conflicts();
            RHOCONF().conflictsResolved();
        }
开发者ID:artemk,项目名称:rhodes,代码行数:33,代码来源:RhodesApp.cs


示例17: PersonViewModel

        public PersonViewModel(int personId, PhoneApplicationPage page)
            : base(page)
        {
            this.Person = Ctx.Persons.SingleOrDefault(x => x.Id == personId);

            if (!String.IsNullOrEmpty(this.Person.FileName))
                this.Person.Image = Storage.ReadImageFromIsolatedStorageToWriteableBitmap(string.Format("ProfilePicture\\{0}", this.Person.FileName)); //GeneralMethods.ResizeImageToThumbnail(Storage.ReadImageFromIsolatedStorageAsStream(this.Person.FileName), 150);
            else
                this.Person.Image = Storage.ReadImageFromContent("./Images/ChoosePhoto.jpg");

            foreach (Date date in this.Person.Dates)
                ChronoGrouping.MarkDate(date);

            this.GroupedDateList =
            (from obj in this.Person.Dates
             orderby (int)obj.ChronoGroupKey ascending, obj.DateOfMeeting ascending
             group obj by obj.ChronoGroupKey.ToDescription() into grouped
             select new Grouping<string, Date>(grouped)).ToList();

            Interests = (from i in Ctx.Interests select new { Description = i.Description, FontSize = i.Weighting * 15, Interest = i }).AsEnumerable()
             .Select(t => new TagCloudItem()
             {
                 Description = t.Description,
                 FontSize = t.FontSize,
                 Margin = new System.Windows.Thickness { Top = GetRandomInt(1, 20, t.FontSize / 15), Left = 10, Right = 10 },
                 Interest = t.Interest
             }).ToList();
        }
开发者ID:travbod57,项目名称:DatingDiary,代码行数:28,代码来源:PersonViewModel.cs


示例18: LanguageControlLoaded

 private void LanguageControlLoaded(object sender, RoutedEventArgs e)
 {
     DependencyObject parent = Parent;
     while (!(parent is PhoneApplicationPage))
         parent = ((FrameworkElement)parent).Parent;
     parentPage = ((PhoneApplicationPage)parent);
 }
开发者ID:jeremejevs,项目名称:word-steps,代码行数:7,代码来源:LanguageControl.xaml.cs


示例19: show

        public void show(string options)
        {
            string[] args = JSON.JsonHelper.Deserialize<string[]>(options);
            string title = args[0];
            string message = args[1];

            if (message == null)
            {
                message = title;
            }

            Deployment.Current.Dispatcher.BeginInvoke(() =>
            {

                if (progressIndicator == null)
                {
                    progressIndicator = new ProgressIndicator() { IsIndeterminate = true };
                }
                progressIndicator.Text = message;
                progressIndicator.IsVisible = true;

                if (page == null)
                {
                    page = (Application.Current.RootVisual as PhoneApplicationFrame).Content as PhoneApplicationPage;
                }

                SystemTray.SetProgressIndicator(page, progressIndicator);

            });
        }
开发者ID:demoode,项目名称:app5,代码行数:30,代码来源:SpinnerDialog.cs


示例20: QCodeKitAdUC

 public QCodeKitAdUC(PhoneApplicationPage parentPage = null)
 {
     _curParentPage = parentPage;
     InitializeComponent();
     this.Loaded += QCodeKitAdUC_Loaded;
     this.Unloaded += QCodeKitAdUC_Unloaded;
 }
开发者ID:qiqiangqq,项目名称:DuoDuoPhotoGallery,代码行数:7,代码来源:QCodeKitAdUC.xaml.cs



注:本文中的PhoneApplicationPage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PhoneCallTask类代码示例发布时间:2022-05-24
下一篇:
C# PhoneApplicationFrame类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap