diff --git a/src/Consolonia.Core/Controls/ConsoloniaAccessText.cs b/src/Consolonia.Core/Controls/ConsoloniaAccessText.cs index a6c83416..082d0bb4 100644 --- a/src/Consolonia.Core/Controls/ConsoloniaAccessText.cs +++ b/src/Consolonia.Core/Controls/ConsoloniaAccessText.cs @@ -9,9 +9,8 @@ namespace Consolonia.Core.Controls /// /// A text block that displays a character prefixed with an underscore as an access key. /// - public class ConsoloniaAccessText : AccessText, IDisposable + public sealed class ConsoloniaAccessText : AccessText { - private bool _disposed; private Run _accessRun; public ConsoloniaAccessText() @@ -19,12 +18,6 @@ public ConsoloniaAccessText() this.PropertyChanged += OnPropertyChanged; } - public void Dispose() - { - this.PropertyChanged -= OnPropertyChanged; - _disposed = true; - } - private void OnPropertyChanged(object sender, Avalonia.AvaloniaPropertyChangedEventArgs e) { switch (e.Property.Name) @@ -64,9 +57,6 @@ private void OnPropertyChanged(object sender, Avalonia.AvaloniaPropertyChangedEv _accessRun.TextDecorations.Clear(); } break; - - default: - break; } } }