Skip to content

Commit 1d6d833

Browse files
small refactoring
1 parent 9174ca6 commit 1d6d833

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ExpandableView/ExpandableView.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class ExpandableView : StackLayout
3232

3333
public static readonly BindableProperty IsTouchToExpandEnabledProperty = BindableProperty.Create(nameof(IsTouchToExpandEnabled), typeof(bool), typeof(ExpandableView), true);
3434

35-
public static readonly BindableProperty SecondaryViewHeightRequestProperty = BindableProperty.Create(nameof(SecondaryViewHeightRequest), typeof(double), typeof(ExpandableView), 0.0);
35+
public static readonly BindableProperty SecondaryViewHeightRequestProperty = BindableProperty.Create(nameof(SecondaryViewHeightRequest), typeof(double), typeof(ExpandableView), -1.0);
3636

3737
public static readonly BindableProperty ExpandAnimationLengthProperty = BindableProperty.Create(nameof(ExpandAnimationLength), typeof(uint), typeof(ExpandableView), 250u);
3838

@@ -157,7 +157,7 @@ private void OnIsExpandedChanged()
157157
}
158158

159159
_startHeight = 0;
160-
_endHeight = SecondaryViewHeightRequest > 0
160+
_endHeight = SecondaryViewHeightRequest >= 0
161161
? SecondaryViewHeightRequest
162162
: _lastVisibleHeight;
163163

@@ -174,7 +174,7 @@ private void OnIsExpandedChanged()
174174
}
175175
else
176176
{
177-
_lastVisibleHeight = _startHeight = SecondaryViewHeightRequest > 0
177+
_lastVisibleHeight = _startHeight = SecondaryViewHeightRequest >= 0
178178
? SecondaryViewHeightRequest
179179
: !isExpanding
180180
? SecondaryView.Height

0 commit comments

Comments
 (0)