Skip to content

Commit 96b39ec

Browse files
committed
Unhook event before assigning to make sure no duplicate
Unhook event before assigning to make sure no duplicate
1 parent b6eae86 commit 96b39ec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Microsoft.Toolkit.Uwp.UI.Controls/MarkdownTextBlock/MarkdownTextBlock.Methods.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,12 @@ private void HookListeners()
184184
{
185185
if (link is Hyperlink hyperlink)
186186
{
187+
hyperlink.Click -= Hyperlink_Click;
187188
hyperlink.Click += Hyperlink_Click;
188189
}
189190
else if (link is Image image)
190191
{
192+
image.Tapped -= NewImagelink_Tapped;
191193
image.Tapped += NewImagelink_Tapped;
192194
}
193195
}

0 commit comments

Comments
 (0)