MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / playWindowAnimation

Method playWindowAnimation

FastCopy/CopyDialogWindow.xaml.cpp:66–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 m_currentSize = size;
65 }
66 void CopyDialogWindow::playWindowAnimation(winrt::Windows::Graphics::SizeInt32 targetSize)
67 {
68 winrt::Microsoft::UI::Xaml::Media::Animation::CircleEase f;
69 f.EasingMode(winrt::Microsoft::UI::Xaml::Media::Animation::EasingMode::EaseInOut);
70 m_heightValue
71 .From(m_currentSize.Height)
72 .To(targetSize.Height)
73 .EasingFunction(f)
74 .Duration(WindowAnimationDuration);
75 m_widthValue
76 .From(m_currentSize.Width)
77 .To(targetSize.Width)
78 .EasingFunction(f)
79 .Duration(WindowAnimationDuration);
80
81 (m_storyboardWrapper << m_heightValue << m_widthValue).Begin();
82
83 m_heightValue.OnValueChange([this](auto, double value) {
84 auto const widthValue = (int)m_widthValue;
85 if (widthValue != 0 && value != 0)
86 ResizeWindow(*this, { .Width = widthValue, .Height = (int)value });
87 });
88 }
89}
90

Callers

nothing calls this directly

Calls 3

ResizeWindowFunction · 0.85
BeginMethod · 0.80
OnValueChangeMethod · 0.80

Tested by

no test coverage detected