I need catch the event endresize in WPF.
For UWP with Rx (System.Reactive)
//Stop window updates
rootFrame = new Frame
{
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
Width = Window.Current.Bounds.Width,
Height = Window.Current.Bounds.Height
};
//updates after throttling
var sizeChangedObservable = Observable.FromEventPattern(
handler => Window.Current.SizeChanged += handler,
handler => Window.Current.SizeChanged -= handler);
sizeChangedObservable.Throttle(TimeSpan.FromSeconds(0.35)).ObserveOnDispatcher(CoreDispatcherPriority.Normal).Subscribe(x =>
{
rootFrame.Width = x.EventArgs.Size.Width;
rootFrame.Height = x.EventArgs.Size.Height;
});