AdvancedLauncher.Tools.Interop.HwndSourceHostRoot.OnChildDesiredSizeChanged C# (CSharp) Method

OnChildDesiredSizeChanged() protected method

This virtual is called when the system measured the child and the result was different. The default behavior is to invalidate measure on the element. However, since we are not visually connected to the containing HwndSourceHost, this doesn't do anything useful. We manually tell the HwndSourceHost so it can invalidate measure on itself.
protected OnChildDesiredSizeChanged ( UIElement child ) : void
child UIElement
return void
        protected override void OnChildDesiredSizeChanged(UIElement child)
        {
            EventHandler handler = OnMeasure;
            if (handler != null) {
                handler(this, EventArgs.Empty);
            }

            base.OnChildDesiredSizeChanged(child);
        }