当前位置: 首页>>代码示例>>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;未经允许,请勿转载。