本文整理匯總了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;
}
}
示例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;
}
}
示例3: VisibilityChanged
private void VisibilityChanged(object sender, VisibilityChangedEventArgs e)
{
if (ScenarioEnableButton.IsEnabled)
{
if (e.Visible)
Enable();
else
Disable();
}
}
示例4: Current_VisibilityChanged
void Current_VisibilityChanged(object sender, VisibilityChangedEventArgs e)
{
if (!e.Visible)
{
}
else
{
}
}
示例5: Current_VisibilityChanged
void Current_VisibilityChanged(object sender, VisibilityChangedEventArgs e)
{
if (!e.Visible)
{
DisposeCaptureAsync();
}
else
{
PrepareCameraView();
}
}
示例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;
}
}
示例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();
}
}
示例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);
}
}
}
示例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;
}
}
}
示例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;
}
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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;
}
}
}
示例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();
}
}
}