Permalink
Browse files

Don't use anonymous delegate to unsubscribe event

  • Loading branch information...
Haacked committed Oct 6, 2015
1 parent 04e7c46 commit d637fb721f0d272bd98bd3409efb190cc60481a5
Showing with 7 additions and 2 deletions.
  1. +7 −2 SeeGitApp/Extensions/CommitAdornerBehavior.cs
@@ -167,8 +167,8 @@ private void HideAdorner(object parameter)
{
if (_adornerControl.IsMouseOver)
{
_adornerControl.MouseLeave -= (s, e) => _adornerControl.Visibility = AdornerVisible;
_adornerControl.MouseLeave += (s, e) => _adornerControl.Visibility = AdornerVisible;
_adornerControl.MouseLeave -= SetVisibility;
_adornerControl.MouseLeave += SetVisibility;
}
else
{
@@ -177,6 +177,11 @@ private void HideAdorner(object parameter)
}
}
private void SetVisibility(object source, MouseEventArgs e)
{
_adornerControl.Visibility = AdornerVisible;
}
/// <summary>
/// ShowAdornerCommand
/// </summary>

0 comments on commit d637fb7

Please sign in to comment.