Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
11 changes: 10 additions & 1 deletion Trimble.Modus.Components/Controls/DropDown/TMDropDown.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Trimble.Modus.Components.Popup.Services;

namespace Trimble.Modus.Components;
public partial class TMDropDown : ContentView, IDisposable
public partial class TMDropDown : ContentView
{
#region Private fields
private double desiredHeight;
Expand Down Expand Up @@ -136,6 +136,7 @@ public TMDropDown()
InitializeComponent();
this.SetDynamicResource(StyleProperty, "DefaultStyle");
PopupService.Instance.Dismissed += OnPopupRemoved;
this.Unloaded += OnUnloaded;
}
#endregion

Expand Down Expand Up @@ -383,8 +384,16 @@ protected override void OnHandlerChanged()
public void Dispose()
{
PopupService.Instance.Dismissed -= OnPopupRemoved;
this.Unloaded -= OnUnloaded;
SelectionChanged = null;
SelectionChangedCommand = null;
ItemsSource = null;
dropDownContents = null;
previousSelection = null;
}

private void OnUnloaded(object sender, EventArgs e)
{
Dispose();
}
}
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</Version>
<Version>1.4.0.1</Version>
<Authors>Trimble Inc</Authors>
<Company>Trimble Inc</Company>
<Product>Trimble.Modus.Components</Product>
Expand Down
Loading