Take windows setting into account to Disable/Enable animations (#748)

This commit is contained in:
Rudy Huyn 2020-01-06 14:36:45 -08:00 committed by Matt Cooley
parent 563404fd99
commit 22f57aab3f
5 changed files with 6 additions and 25 deletions

View file

@ -83,16 +83,6 @@ App::App()
#endif
}
bool App::m_isAnimationEnabled = true;
/// <summary>
/// Return True if animation is enabled by user setting.
/// </summary>
bool App::IsAnimationEnabled()
{
return App::m_isAnimationEnabled;
}
void App::AddWindowToMap(_In_ WindowFrameService ^ frameService)
{
reader_writer_lock::scoped_lock lock(m_windowsMapLock);
@ -218,9 +208,6 @@ void App::OnAppLaunch(IActivatedEventArgs ^ args, String ^ argument)
// }
//#endif
auto userSettings = ref new Windows::UI::ViewManagement::UISettings();
m_isAnimationEnabled = userSettings->AnimationsEnabled;
args->SplashScreen->Dismissed += ref new TypedEventHandler<SplashScreen ^, Object ^>(this, &App::DismissedEventHandler);
auto rootFrame = dynamic_cast<Frame ^>(Window::Current->Content);