Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0...

16
Simple Clicker App WPF App using C#

description

Click ‘New Project’

Transcript of Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0...

Page 1: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Simple Clicker App

WPF App using C#

Page 2: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

App Requirement • Need a ‘counter’ display, which starts at 0• Need a ‘clicker’ button !• Pressing the clicker every time should increment the counter by 1 !

How do we create this simple app ??

Page 3: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Click ‘New Project’

Page 4: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Choose ‘WPF Application’ template and click ‘ok’

Page 5: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Empty WPF Application Created !

Page 6: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Choose & drag a ‘button’ onto the app window

Page 7: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

App now contains a button !

Page 8: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Drag a TextBlock onto the app window

Page 9: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

App now has a TextBlock too

Page 10: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Change button label/text to ‘Click’

Page 11: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Change TextBlock text to ‘0’

Page 12: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Double click on the button to generate ‘button click’ handler method !

Page 13: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Write code for the ‘button click’ event handler method

Page 14: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Click app window corner and drag to resize as required

Page 15: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Resize TextBlock and change Font Size to 28

Page 16: Simple Clicker App WPF App using C#. App Requirement Need a ‘counter’ display, which starts at 0 Need a ‘clicker’ button ! Pressing the clicker every.

Save All and Run program !