Small Basic: Interactive Learning with Xamarin Workbooks
This article introduces Xamarin Workbooks with SmallBasic.Workbook 1.2.0. Xamarin Workbooks is an interactive learning tool for C#. SmallBasic.Workbook is a package to allow using Small Basic library in Xamarin Workbooks. C# and Small Basic are programming languages running on Microsoft .NET Framework.
Install Xamarin Workbooks
Xamarin Workbooks can be downloaded from https://developer.xamarin.com/workbooks/. Following instructions are for installing Xamarin Workbooks.
- Click [Download Now].
- Click [Xamarin Workbooks for Windows]. (Or [Xamarin Workbooks for Mac].)
- [Run] XamarinInteractive-1.3.0.msi. (Or download XamarinInteractive-1.3.0.pkg and run.)
Add SmallBasic.Workbook Package
Add SmallBasic.Workbook with following instructions.
- Run Xamarin Workbooks.
- Select [WPF] for a new workbook.
- Push [CREATE WORKBOOK] button.
- Select [File] [Add Package] menu.
- Type "SmallBasic" in Search NuGet text box.
- Select "SmallBasic.Workbook 1.2.0".
- Push [ADD PACKAGE] Button.
- Then you can see the following code.
#r "SmallBasicLibrary"
Add Code
Type following code. When start typing, IntelliSense candidate will be displayed. So, hitting Enter key will complete the keyword. Between two lines Shift+Enter will add new line.
using Microsoft.SmallBasic.Library;
Clock.Date
After typing the code above, hit enter to show the result of Clock.Date. Push [+] button to insert a new executable C# cell.
Add Document
Push ["] button to insert a new document cell. In document cell, comments or instructions can be described as rich text.
Samples
Following samples are available in TechNet Gallery. Select [Run] [Run All] to run all executable cells.
- Xamarin Workbook: Learn C# for Small Basic Users
- Xamarin Workbooks: Programing with Small Basic Objects
Known Issues
This list is for Xamarin Workbooks 1.3.x. Known issues in SmallBasic.Workbook 1.2.0 are listed here.
- After saving the workbook, content after Horizontal Rule in document cell disappears. Workaround: Remove redundant --- from .workbook file with a text editor. This issue is filed in Bugzilla as 59452.
- While pasting text in document cell, it sometimes causes Script Errors. Workaround: Push Yes button again and again. This issue is filed in Bugzilla as 60035.
See Also
Additional Recourses
- Small Basic with Xamarin Workbooks | MSDN Blog
- Xamarin Workbook: Programming with Small Basic Objects | GitHub
- Xamarin Workbook: Learn C# for Small Basic Users | GitHub
- Snack Pack 4: Interactive Learning with Xamarin Workbooks | Channel 9
- SmallBasic.Workbook 1.2.0 | NuGet Gallery
- Small Basic Sample Code for Xamarin Workbooks | MSDN Forum