Here are the steps:
Step 2: Add the following namespaces to your project which is needed in further C# code.
Step 3: Copy and paste the following code to the cs page which will be called on button click event and will enable full screen if not and will be back to the current screens size if clicked again:
Step 4: Run your application and test yourself.