How do I disable a button?

You can disable a button by setting its IsEnabled property to false. This will gray out the button and prevent user interaction.XAML: