Get familiar with Xamarin Workbooks

Get familiar with Xamarin Workbooks

workbooks1

 

Short introduction

Nowadays you can learn how to code in many ways. Tutorials, code samples, videos and blogs. Yes – they are all great sources of knowledge and examples. But what about one more practical way to learn about C# language or maybe mobile applications created with Xamarin for iOS and Android? Here you are – Xamarin Workbooks is something you need to gain more knowledge in a fast and easy way! What’s more – there is IntelliSense to simplify writing new code.

Xamarin Workbooks provide code samples for learning, experiment and create guides. In this article I would like to present you how to start and how to use them.

 

What do I need to start?

1) Xamarin Workbooks installed

2) Meet below requirements:

workbooks2

 

Let’s start

Once you install Xamarin Workbooks on your machine (either Mac or Windows) you can start using them!

 

Use Xamarin Workbooks samples

1) Go to Xamarin Workbooks samples page here.

2) Scroll down a little bit. As you can see there are plenty of samples to use:

a. Android

b. Azure

c. C#

d. iOS

e. Graphics

f. Mac

g. WPF

h. Xamarin.Forms

3) Scroll to Xamarin.Forms section and select “Hello Xamarin.Forms” sample to download:

workbooks3

4) Once you download the file you should see it. Double click to open it:

workbooks4

5) Xamarin Workbook should open and iOS emulator should be launched automatically:

workbooks5

As you can see (when scrolling down) there are descriptions with code snippets. That is great because instead of explanation you have code samples. But that’s not enough!

6) Let’s see small fragment of code showed below:

workbooks7_7

You can see this three small icons above. Let’s explain their functionality:

a. First button from the left (plus icon) – clicking on it you can add new C# code snippet.

b. Button in the middle is responsible for adding space for new description – so when you want to describe what is happening in the specific fragment od code

c. Button on the right – you can delete documentation fragment

Of course you can modify both – code samples and documentation.

 

Run selected code fragments instantly and see result

With Xamarin Workbooks you are able to test and check each code snippet instantly – just click button:

workbooks8

workbooks9

 

Create your own Workbook

As you saw above you can download great samples and go through them. But what about creating your own Workbook? Yes, it is possible to! All information is available under this link to documentation. It is really simple and what is more – IntelliSense is supported so you can see hints available in Visual Studio or Xamarin Studio.

 

Sum up

As you can see Xamarin Workbook is great tool to help developers gain knowledge, test code and write own documentation in in interactive way. Great samples are available but remember that you can create your own to. Have a nice coding!

Advertisements