I just wanted to simplify the code a lot and I have such a XAML code.
<ToggleButton x:Name="LogToggleBtn" Click="LogToggleBtn_Click"/> This is the C # code on the ToggleBtn click.
SetSettingsValue("LOGGING", LogToggleBtn.IsChecked == true ? "1" : "0"); How can this be simplified to do this without a method? In the sense of calling this method with parameters on conditions, but without C # code.
I know almost nothing about MVVM, if you can skip the solution. :)
SetSettingsValue - Method, takes two arguments, string and string. For some other elements, the exact same method is reserved only with string and int.