@@ -59,24 +59,27 @@ protected override void OnFixChildrenDockLengths()
59
59
var childContainerModel = _model . Children [ i ] as ILayoutContainer ;
60
60
var childPositionableModel = _model . Children [ i ] as ILayoutPositionableElement ;
61
61
62
- if ( childContainerModel != null &&
63
- ( childContainerModel . IsOfType < LayoutDocumentPane , LayoutDocumentPaneGroup > ( ) ||
64
- childContainerModel . ContainsChildOfType < LayoutDocumentPane , LayoutDocumentPaneGroup > ( ) ) )
62
+ if ( childPositionableModel . ForceFixedDockSize )
65
63
{
66
- childPositionableModel . DockWidth = new GridLength ( 1.0 , GridUnitType . Star ) ;
67
- }
68
- else if ( childPositionableModel != null && childPositionableModel . DockWidth . IsStar )
69
- {
70
- var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize ;
71
- var childDockMinWidth = childPositionableModel . CalculatedDockMinWidth ( ) ;
72
- var widthToSet = Math . Max ( childPositionableModelWidthActualSize . ActualWidth , childDockMinWidth ) ;
73
-
74
- widthToSet = Math . Min ( widthToSet , ActualWidth / 2.0 ) ;
75
- widthToSet = Math . Max ( widthToSet , childDockMinWidth ) ;
76
-
77
- childPositionableModel . DockWidth = new GridLength (
78
- widthToSet ,
79
- GridUnitType . Pixel ) ;
64
+ if ( childContainerModel != null &&
65
+ ( childContainerModel . IsOfType < LayoutDocumentPane , LayoutDocumentPaneGroup > ( ) ||
66
+ childContainerModel . ContainsChildOfType < LayoutDocumentPane , LayoutDocumentPaneGroup > ( ) ) )
67
+ {
68
+ childPositionableModel . DockWidth = new GridLength ( 1.0 , GridUnitType . Star ) ;
69
+ }
70
+ else if ( childPositionableModel != null && childPositionableModel . DockWidth . IsStar )
71
+ {
72
+ var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize ;
73
+ var childDockMinWidth = childPositionableModel . CalculatedDockMinWidth ( ) ;
74
+ var widthToSet = Math . Max ( childPositionableModelWidthActualSize . ActualWidth , childDockMinWidth ) ;
75
+
76
+ widthToSet = Math . Min ( widthToSet , ActualWidth / 2.0 ) ;
77
+ widthToSet = Math . Max ( widthToSet , childDockMinWidth ) ;
78
+
79
+ childPositionableModel . DockWidth = new GridLength (
80
+ widthToSet ,
81
+ GridUnitType . Pixel ) ;
82
+ }
80
83
}
81
84
}
82
85
}
@@ -85,7 +88,7 @@ protected override void OnFixChildrenDockLengths()
85
88
for ( int i = 0 ; i < _model . Children . Count ; i ++ )
86
89
{
87
90
var childPositionableModel = _model . Children [ i ] as ILayoutPositionableElement ;
88
- if ( ! childPositionableModel . DockWidth . IsStar )
91
+ if ( childPositionableModel . ForceFixedDockSize && ! childPositionableModel . DockWidth . IsStar )
89
92
{
90
93
childPositionableModel . DockWidth = new GridLength ( 1.0 , GridUnitType . Star ) ;
91
94
}
@@ -101,21 +104,24 @@ protected override void OnFixChildrenDockLengths()
101
104
var childContainerModel = _model . Children [ i ] as ILayoutContainer ;
102
105
var childPositionableModel = _model . Children [ i ] as ILayoutPositionableElement ;
103
106
104
- if ( childContainerModel != null &&
105
- ( childContainerModel . IsOfType < LayoutDocumentPane , LayoutDocumentPaneGroup > ( ) ||
106
- childContainerModel . ContainsChildOfType < LayoutDocumentPane , LayoutDocumentPaneGroup > ( ) ) )
107
+ if ( childPositionableModel . ForceFixedDockSize )
107
108
{
108
- childPositionableModel . DockHeight = new GridLength ( 1.0 , GridUnitType . Star ) ;
109
- }
110
- else if ( childPositionableModel != null && childPositionableModel . DockHeight . IsStar )
111
- {
112
- var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize ;
113
- var childDockMinHeight = childPositionableModel . CalculatedDockMinHeight ( ) ;
114
- var heightToSet = Math . Max ( childPositionableModelWidthActualSize . ActualHeight , childDockMinHeight ) ;
115
- heightToSet = Math . Min ( heightToSet , ActualHeight / 2.0 ) ;
116
- heightToSet = Math . Max ( heightToSet , childDockMinHeight ) ;
117
-
118
- childPositionableModel . DockHeight = new GridLength ( heightToSet , GridUnitType . Pixel ) ;
109
+ if ( childContainerModel != null &&
110
+ ( childContainerModel . IsOfType < LayoutDocumentPane , LayoutDocumentPaneGroup > ( ) ||
111
+ childContainerModel . ContainsChildOfType < LayoutDocumentPane , LayoutDocumentPaneGroup > ( ) ) )
112
+ {
113
+ childPositionableModel . DockHeight = new GridLength ( 1.0 , GridUnitType . Star ) ;
114
+ }
115
+ else if ( childPositionableModel != null && childPositionableModel . DockHeight . IsStar )
116
+ {
117
+ var childPositionableModelWidthActualSize = childPositionableModel as ILayoutPositionableElementWithActualSize ;
118
+ var childDockMinHeight = childPositionableModel . CalculatedDockMinHeight ( ) ;
119
+ var heightToSet = Math . Max ( childPositionableModelWidthActualSize . ActualHeight , childDockMinHeight ) ;
120
+ heightToSet = Math . Min ( heightToSet , ActualHeight / 2.0 ) ;
121
+ heightToSet = Math . Max ( heightToSet , childDockMinHeight ) ;
122
+
123
+ childPositionableModel . DockHeight = new GridLength ( heightToSet , GridUnitType . Pixel ) ;
124
+ }
119
125
}
120
126
}
121
127
}
@@ -124,7 +130,7 @@ protected override void OnFixChildrenDockLengths()
124
130
for ( int i = 0 ; i < _model . Children . Count ; i ++ )
125
131
{
126
132
var childPositionableModel = _model . Children [ i ] as ILayoutPositionableElement ;
127
- if ( ! childPositionableModel . DockHeight . IsStar )
133
+ if ( childPositionableModel . ForceFixedDockSize && ! childPositionableModel . DockHeight . IsStar )
128
134
{
129
135
childPositionableModel . DockHeight = new GridLength ( 1.0 , GridUnitType . Star ) ;
130
136
}
0 commit comments