Is my implementation terriblw ?

 private void PenSettingsButton_OnOpened(object sender, object e) => PenSettingsButton.Background = (SolidColorBrush)Resources["SystemControlHighlightAccentBrush"]; private void PenSettingsButton_OnClosed(object sender, object e) => PenSettingsButton.Background = (SolidColorBrush)Resources["SystemControlBackgroundBaseLowBrush"]; <Flyout x:Name="PenSettingsButtonFlyout" Opened="PenSettingsButton_OnOpened" Closed="PenSettingsButton_OnClosed"> 

This is an example of things I regularly do and feel terrible about. I have this this button that changes text when another UIElement it toggled, is this terrible, or the only way of doing it?

Edit: Title ftw.

by upvoter_1001 via /r/csharp

Leave a Reply