Beispiel #1
0
        public UI.Size Measure(UI.Size constraints)
        {
            double width  = passwordBox.Width;
            double height = passwordBox.Height;

            passwordBox.Width  = double.NaN;
            passwordBox.Height = double.NaN;

            passwordBox.Measure(new System.Windows.Size(constraints.Width, constraints.Height));

            passwordBox.Width  = width;
            passwordBox.Height = height;
            return(new UI.Size(passwordBox.DesiredSize.Width, passwordBox.DesiredSize.Height));
        }