FirstFloor.ModernUI.Windows.Controls.FrameworkElementAdorner.DetermineWidth C# (CSharp) Method

DetermineWidth() private method

Determine the width of the child.
private DetermineWidth ( ) : double
return double
        private double DetermineWidth() {
            if (!double.IsNaN(PositionX)) return _child.DesiredSize.Width;
            switch (_child.HorizontalAlignment) {
                case HorizontalAlignment.Left:
                    return _child.DesiredSize.Width;
                case HorizontalAlignment.Right:
                    return _child.DesiredSize.Width;
                case HorizontalAlignment.Center:
                    return _child.DesiredSize.Width;
                case HorizontalAlignment.Stretch:
                    return AdornedElement.ActualWidth;
                default:
                    return 0d;
            }
        }