Inheritance: Windows.UI.Xaml.Controls.Page
示例#1
0
        internal VidyanoPage(LayoutAwarePage page)
        {
            Page = page;
            Page.SizeChanged += Page_SizeChanged;

            ViewState = ApplicationView.Value;
        }
        internal PersistentObjectPage(LayoutAwarePage page, StorePersistentObject po)
            : base(page)
        {
            PersistentObject = po;
            PersistentObject.NotificationChanged += PersistentObject_NotificationChanged;
            if (PersistentObject.HasNotification)
                PersistentObject_NotificationChanged(this, new NotificationChangedEventArgs(PersistentObject.Notification, PersistentObject.NotificationType));

            ActiveSnappedTab = PersistentObject.Tabs.FirstOrDefault();

            ActionBase[] leftActions, rightActions;
            StoreHooks.ArrangeActions(PersistentObject.Actions, PersistentObject.PinnedActions, out leftActions, out rightActions);
            LeftActions = leftActions;
            RightActions = rightActions;

            OnApplicationViewStateChanged();
        }
示例#3
0
        internal QueryPage(LayoutAwarePage page, StoreQuery query)
            : base(page)
        {
            Query = query;

            Query.NotificationChanged += Query_NotificationChanged;
            if (Query.HasNotification)
                Query_NotificationChanged(this, new NotificationChangedEventArgs(Query.Notification, Query.NotificationType));

            if (Client.CurrentClient.HasSearch)
                SearchPane.GetForCurrentView().ShowOnKeyboardInput = true;

            ActionBase[] leftActions, rightActions;
            StoreHooks.ArrangeActions(Query.Actions, Query.PinnedActions, out leftActions, out rightActions);
            LeftActions = leftActions;
            RightActions = rightActions;

            if (!Query.IsZoomedIn)
                UpdateActionBar(true);

            OnApplicationViewStateChanged();
        }
示例#4
0
        public SignInPage(LayoutAwarePage page)
            : base(page)
        {
            Template = (DataTemplate)Application.Current.Resources["SignInPage"];
            try
            {
                SearchPane.GetForCurrentView().ShowOnKeyboardInput = false;
            }
            catch
            {
                // Throws an "Element not found" exception, even though this is called after OnLaunched
            }

            SignIn = new SimpleActionCommand(async _ => await TrySignIn());
            CancelSignIn = new ActionCommand(_ => promptServiceProviderWaiter.Set(), _ => ClientData != null && !String.IsNullOrEmpty(ClientData.DefaultUserName), this, "ClientData");
            RetryConnect = new SimpleActionCommand(async _ => await Connect());
            SelectServiceProvider = new ActionCommand(provider =>
            {
                selectedProvider = (ServiceProvider)provider;
                promptServiceProviderWaiter.Set();
            }, provider =>  (provider is ServiceProvider && ((ServiceProvider)provider).Name != "Vidyano") || (!String.IsNullOrEmpty(Password) && !String.IsNullOrEmpty(UserName)), this, "UserName", "Password");

            page.KeyUp += Page_KeyUp;
        }
示例#5
0
 internal HomePage(LayoutAwarePage page)
     : base(page)
 {
     OnApplicationViewStateChanged();
 }
 internal QueryItemSelectPage(LayoutAwarePage page)
     : base(page)
 {
     CancelCommand = new SimpleActionCommand(e => page.Frame.SetNavigationState(previousState));
     Template = (DataTemplate)Application.Current.Resources["QueryItemSelectPage"];
 }