I am having multiple buttons with contents 1, 2, 3, 4, 5... like this. All buttons are using same function on Click event.
If you place Name or x:Name attributes in your XAML for your buttons, you can then use the native object.Equals() without having to cast or dereference. This also protects you from having to double edit your code, and possibly forgetting to edit in both places when the Content of the control is changed.
Given
then
if (sender.Equals(btnOne)) {...}
if (sender.Equals(btnTwo)) {...}