Beispiel #1
0
        private void OnWindowResize(object sender, AutoResizedEventArgs e)
        {
            // _positionInfo can be null if an exception aborted the measure process.
            // We can't recover from this, but we can let the app/user know what
            // caused the original exception.
            if (_positionInfo == null)
            {
                Exception nre = new NullReferenceException();
                throw new NullReferenceException(nre.Message, SavedException);
            }
            else
            {
                // if the app has recovered from original exception, clear the field
                SavedExceptionField.ClearValue(this);
            }

            if (e.Size != _positionInfo.ChildSize)
            {
                _positionInfo.ChildSize = e.Size;

                // Reposition the popup
                Reposition();
            }
        }
Beispiel #2
0
        private void OnWindowResize(object sender, AutoResizedEventArgs e) 
        {
            if (e.Size != _positionInfo.ChildSize)
            {
                _positionInfo.ChildSize = e.Size; 

                // Reposition the popup 
                Reposition(); 
            }
        }