Skip to content

Commit 711f30c

Browse files
committed
removed compiler directives in cell measure
1 parent 13d0b8f commit 711f30c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/TableViewCell.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ protected override Size MeasureOverride(Size availableSize)
8989
{
9090
if (Column is not null && Row is not null && _contentPresenter is not null && Content is FrameworkElement element)
9191
{
92-
#if WINDOWS
9392
#region TEMP_FIX_FOR_ISSUE https://github.com/microsoft/microsoft-ui-xaml/issues/9860
9493
element.MaxWidth = double.PositiveInfinity;
9594
element.MaxHeight = double.PositiveInfinity;
9695
#endregion
97-
#endif
96+
9897
element.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
9998

10099
var desiredWidth = element.DesiredSize.Width;
@@ -108,7 +107,6 @@ protected override Size MeasureOverride(Size availableSize)
108107

109108
Column.DesiredWidth = Math.Max(Column.DesiredWidth, desiredWidth);
110109

111-
#if WINDOWS
112110
#region TEMP_FIX_FOR_ISSUE https://github.com/microsoft/microsoft-ui-xaml/issues/9860
113111
var contentWidth = Column.ActualWidth;
114112
contentWidth -= element.Margin.Left;
@@ -145,7 +143,6 @@ protected override Size MeasureOverride(Size availableSize)
145143
_contentPresenter.Visibility = Visibility.Visible;
146144
}
147145
#endregion
148-
#endif
149146
}
150147

151148
return base.MeasureOverride(availableSize);

0 commit comments

Comments
 (0)