Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,18 @@ internal DropDownContents(View anchorView, Enums.ModalPosition position) : base(
public Thickness Margin { get; set; }
public IEnumerable ItemSource { get; set; }
public double DesiredHeight { get; set; }
public double DesiredWidth { get; set; }
Comment thread
rthanga1 marked this conversation as resolved.
public EventHandler<SelectedItemChangedEventArgs> SelectedEventHandler { get; set; }
public int SelectedIndex { get; set; }
public double YPosition { get; set; }
public new double Height { get; set; }

public Action ChangeIndicatorWhenPopupRemove { get; set; }
Comment thread
rthanga1 marked this conversation as resolved.
public void Build()
{
Animation = new RevealAnimation(DesiredHeight);
border.Margin = Margin;
border.HeightRequest = DesiredHeight;
border.WidthRequest = WidthRequest;
border.WidthRequest = DesiredWidth;
listView.ItemsSource = ItemSource;
if (SelectedIndex < 0)
{
Expand All @@ -70,7 +71,11 @@ public void Build()
#endif
}
}

protected override void OnDisappearing()
{
base.OnDisappearing();
ChangeIndicatorWhenPopupRemove?.Invoke();
}
private static void UpdateBackgroundColorOfCell(ListView listView)
{
if (listView.SelectedItem != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@ private async void Open()
SelectedItem = this.SelectedItem,
Margin = margin,
DesiredHeight = desiredHeight,
WidthRequest = innerBorder.Width,
DesiredWidth = innerBorder.Width,
SelectedEventHandler = OnSelected,
YPosition = loc.Y,
Height = height
Height = height,
ChangeIndicatorWhenPopupRemove = OnPopupRemoved
};
dropDownContents.Build();
await Task.WhenAll(
Expand All @@ -260,7 +261,7 @@ await Task.WhenAll(
}
}

private void OnPopupRemoved(object sender, EventArgs e)
private void OnPopupRemoved()
{
Close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override void Preparing(View content, PopupPage page)
if (HasBackgroundAnimation)
{
_defaultOpacity = page.Opacity;
page.HeightRequest = 0;
//page.HeightRequest = 0;
}
else if (content != null)
{
Expand Down
2 changes: 1 addition & 1 deletion Trimble.Modus.Components/Trimble.Modus.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Trimble.Modus.Components</PackageId>
<Title>Trimble Modus</Title>
<Version>1.4.0.2</Version>
<Version>1.4.0.3</Version>
<Authors>Trimble Inc</Authors>
<Company>Trimble Inc</Company>
<Product>Trimble.Modus.Components</Product>
Expand Down
Loading