當前位置: 首頁>>代碼示例>>C#>>正文


C# Core.VisibilityChangedEventArgs類代碼示例

本文整理匯總了C#中Windows.UI.Core.VisibilityChangedEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# VisibilityChangedEventArgs類的具體用法?C# VisibilityChangedEventArgs怎麽用?C# VisibilityChangedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


VisibilityChangedEventArgs類屬於Windows.UI.Core命名空間,在下文中一共展示了VisibilityChangedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnVisibilityChanged

 private void OnVisibilityChanged(CoreWindow sender, VisibilityChangedEventArgs args)
 {
     if (args.Visible == false)
         SystemNavigationManager.GetForCurrentView().BackRequested -= BackButtonPressed;
     else
     {
         SystemNavigationManager.GetForCurrentView().BackRequested += BackButtonPressed;
     }
 }
開發者ID:thewindev,項目名稱:Toastmaster-Tools,代碼行數:9,代碼來源:HomeView.xaml.cs

示例2: MainPage_VisibilityChanged

 private void MainPage_VisibilityChanged(CoreWindow sender, VisibilityChangedEventArgs args)
 {
     if (args.Visible == false)
     {
         //whenever we move away from the page, save data. 
         App.PageData = txtDataToBeSaved.Text;
         App.UseCloudStorage = chkSaveToCloud.IsChecked.Value;
         App.ExtendedExecution = chkEnableExtension.IsChecked.Value;
     }
 }
開發者ID:bospoort,項目名稱:Win10UWPDemo,代碼行數:10,代碼來源:MainPage.xaml.cs

示例3: VisibilityChanged

 private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (ScenarioEnableButton.IsEnabled)
     {
         if (e.Visible)
             Enable();
         else
             Disable();
     }
 }
開發者ID:henriquetomaz,項目名稱:win8-samples,代碼行數:10,代碼來源:Scenario1a.xaml.cs

示例4: Current_VisibilityChanged

 void Current_VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (!e.Visible)
     {
         
     }
     else
     {
         
     }
 }
開發者ID:Appverse,項目名稱:appverse-mobile,代碼行數:11,代碼來源:CameraViewPage.xaml.cs

示例5: Current_VisibilityChanged

 void Current_VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (!e.Visible)
     {
         DisposeCaptureAsync();
     }
     else
     {
         PrepareCameraView();
     }
 }
開發者ID:Appverse,項目名稱:appverse-mobile,代碼行數:11,代碼來源:CameraViewPage.xaml.cs

示例6: VisibilityChanged

        private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
        {

            if (e.Visible)
            {
                // A view is consolidated with other views hen there's no way for the user to get to it (it's not in the list of recently used apps, cannot be
                // launched from Start, etc.) A view stops being consolidated when it's visible--at that point the user can interact with it, move it on or off screen, etc. 
                // It's generally a good idea to close a view after it has been consolidated, but keep it open while it's visible.
                Consolidated = false;
            }
        }
開發者ID:mrbgit,項目名稱:Interop-REST-Mail-Contacts-Calendar-Sample,代碼行數:11,代碼來源:ViewLifetimeControl.cs

示例7: Window_VisibilityChanged

        private async void Window_VisibilityChanged(object sender, VisibilityChangedEventArgs e)
        {
            // Since a registration can change from ForegroundOverride to Disabled when the device
            // is locked, update the registrations when the app window becomes visible
            if (e.Visible && isHceSupported)
            {
                // Clear the messages
                rootPage.NotifyUser(String.Empty, NotifyType.StatusMessage, true);

                lstCards.ItemsSource = await SmartCardEmulator.GetAppletIdGroupRegistrationsAsync();
            }
        }
開發者ID:COMIsLove,項目名稱:Windows-universal-samples,代碼行數:12,代碼來源:ManageCard.xaml.cs

示例8: OnVisibilityChanged

 private void OnVisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (_delayStoryboard != null)
     {
         if (e.Visible)
         {
             var back = _container.Children[0] as Control;
             var fore = _container.Children[1] as Control;
             _container.Children.Clear();
             _container.Children.Add(back);
             _container.Children.Add(fore);
         }
     }
 }
開發者ID:ridomin,項目名稱:waslibs,代碼行數:14,代碼來源:SlideShow.cs

示例9: VisibilityChanged

 /// <summary>
 /// This is the event handler for VisibilityChanged events. You would register for these notifications
 /// if handling sensor data when the app is not visible could cause unintended actions in the app.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">
 /// Event data that can be examined for the current visibility state.
 /// </param>
 private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (ScenarioDisableButton.IsEnabled)
     {
         if (e.Visible)
         {
             // Re-enable sensor input (no need to restore the desired reportInterval... it is restored for us upon app resume)
             accelerometer.ReadingChanged += ReadingChanged;
         }
         else
         {
             // Disable sensor input (no need to restore the default reportInterval... resources will be released upon app suspension)
             accelerometer.ReadingChanged -= ReadingChanged;
         }
     }
 }
開發者ID:jigartailor1984,項目名稱:UWPAppSamples,代碼行數:24,代碼來源:Scenario5_DataEventsBatching.xaml.cs

示例10: VisibilityChanged

 private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (Animating)
     {
         if (!e.Visible)
         {
             // Stop updating since you can't render to a SurfaceImageSource when the window isn't visible
             CompositionTarget.Rendering -= AdvanceAnimation;
         }
         else
         {
             // Restart rendering
             CompositionTarget.Rendering += AdvanceAnimation;
         }
     }
 }
開發者ID:ckc,項目名稱:WinApp,代碼行數:16,代碼來源:Scenario2.xaml.cs

示例11: VisibilityChanged

        private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
        {

            if (e.Visible)
            {
                // Re-enable sensor input (no need to restore the desired reportInterval... it is restored for us upon app resume)
                _accelerometer.ReadingChanged +=
                    new TypedEventHandler<Accelerometer, AccelerometerReadingChangedEventArgs>(ReadingChanged);
            }
            else
            {
                // Disable sensor input (no need to restore the default reportInterval... resources will be released upon app suspension)
                _accelerometer.ReadingChanged -=
                    new TypedEventHandler<Accelerometer, AccelerometerReadingChangedEventArgs>(ReadingChanged);
            }
        }
開發者ID:Al87,項目名稱:Robot,代碼行數:16,代碼來源:SensorWindow.xaml.cs

示例12: VisibilityChanged

 /// <summary>
 /// This is the event handler for VisibilityChanged events. You would register for these notifications
 /// if handling sensor data when the app is not visible could cause unintended actions in the app.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">
 /// Event data that can be examined for the current visibility state.
 /// </param>
 private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (ScenarioDisableButton.IsEnabled)
     {
         if (e.Visible)
         {
             // Re-enable sensor input (no need to restore the desired reportInterval... it is restored for us upon app resume)
             _sensor.OrientationChanged += new TypedEventHandler<SimpleOrientationSensor, SimpleOrientationSensorOrientationChangedEventArgs>(OrientationChanged);
         }
         else
         {
             // Disable sensor input (no need to restore the default reportInterval... resources will be released upon app suspension)
             _sensor.OrientationChanged -= new TypedEventHandler<SimpleOrientationSensor, SimpleOrientationSensorOrientationChangedEventArgs>(OrientationChanged);
         }
     }
 }
開發者ID:badreddine-dlaila,項目名稱:Windows-8.1-Universal-App,代碼行數:24,代碼來源:Scenario1_DataEvents.xaml.cs

示例13: VisibilityChanged

 /// <summary>
 /// This is the event handler for VisibilityChanged events. You would register for these notifications
 /// if handling sensor data when the app is not visible could cause unintended actions in the app.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">
 /// Event data that can be examined for the current visibility state.
 /// </param>
 private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (ScenarioDisableButton.IsEnabled)
     {
         if (e.Visible)
         {
             // Re-enable sensor input
             _accelerometer.Shaken += new TypedEventHandler<Accelerometer, AccelerometerShakenEventArgs>(Shaken);
         }
         else
         {
             // Disable sensor input
             _accelerometer.Shaken -= new TypedEventHandler<Accelerometer, AccelerometerShakenEventArgs>(Shaken);
         }
     }
 }
開發者ID:mbin,項目名稱:Win81App,代碼行數:24,代碼來源:Scenario2.xaml.cs

示例14: VisibilityChanged

 /// <summary>
 /// This is the event handler for VisibilityChanged events. You would register for these notifications
 /// if handling sensor data when the app is not visible could cause unintended actions in the app.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">
 /// Event data that can be examined for the current visibility state.
 /// </param>
 private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (ScenarioDisableButton.IsEnabled)
     {
         if (e.Visible)
         {
             // Re-enable sensor input
             _accelerometer.Shaken += Shaken;
         }
         else
         {
             // Disable sensor input
             _accelerometer.Shaken -= Shaken;
         }
     }
 }
開發者ID:jigartailor1984,項目名稱:UWPAppSamples,代碼行數:24,代碼來源:Scenario2_ShakeEvents.xaml.cs

示例15: VisibilityChanged

 /// <summary>
 /// This is the event handler for VisibilityChanged events. You would register for these notifications
 /// if handling sensor data when the app is not visible could cause unintended actions in the app.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">
 /// Event data that can be examined for the current visibility state.
 /// </param>
 private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
 {
     if (ScenarioDisableButton.IsEnabled)
     {
         if (e.Visible)
         {
             // Re-enable sensor input (no need to restore the desired reportInterval... it is restored for us upon app resume)
             _dispatcherTimer.Start();
         }
         else
         {
             // Disable sensor input (no need to restore the default reportInterval... resources will be released upon app suspension)
             _dispatcherTimer.Stop();
         }
     }
 }
開發者ID:jigartailor1984,項目名稱:UWPAppSamples,代碼行數:24,代碼來源:Scenario3_Polling.xaml.cs


注:本文中的Windows.UI.Core.VisibilityChangedEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。