示例#1
0
        internal object CreateDomElement_CSSVersion(object parentRef, out object domElementWhereToPlaceChildren)
        {
#if !BRIDGE
            object outerDiv = base.CreateDomElement(parentRef, out _innerDiv);
#else
            object outerDiv = CreateDomElement_WorkaroundBridgeInheritanceBug(parentRef, out _innerDiv);
#endif
            domElementWhereToPlaceChildren = _innerDiv;

            // Set the element on which the "MaxWidth" and "MaxHeight" properties should be applied (cf. zendesk ticket #1178 where scrollbars inside the ChildWindow did not function properly):
            this.INTERNAL_OptionalSpecifyDomElementConcernedByMinMaxHeightAndWidth = _innerDiv;

            // Set the "display" CSS property:
            dynamic style = INTERNAL_HtmlDomManager.GetDomElementStyleForModification(_innerDiv);
            style.display = !Grid_InternalHelpers.isMSGrid() ? style.display = "grid" : Grid_InternalHelpers.INTERNAL_CSSGRID_MS_PREFIX + "grid";

            // Normalize the sizes of the rows and columns:
            List <ColumnDefinition> normalizedColumnDefinitions = null;
            List <RowDefinition>    normalizedRowDefinitions    = null;
            Grid_InternalHelpers.NormalizeWidthAndHeightPercentages(this, _columnDefinitionsOrNull, _rowDefinitionsOrNull, out normalizedColumnDefinitions, out normalizedRowDefinitions);

            // Refresh the rows heights and columns widths:
            Grid_InternalHelpers.RefreshAllRowsHeight_CSSVersion(this, normalizedColumnDefinitions, normalizedRowDefinitions);
            Grid_InternalHelpers.RefreshAllColumnsWidth_CSSVersion(this, normalizedColumnDefinitions, normalizedRowDefinitions);

            return(outerDiv);
        }