Skip to content

@GettingStarted~tvOS

Happypig375 edited this page Aug 29, 2018 · 3 revisions

Getting Started with Xamarin.tvOS

  1. Create a Xamarin.tvOS project. Choose a Single View App to start.

Create

  1. After going through the configuration window, open the Add Packages... window and install CSharpMath.SkiaSharp and SkiaSharp.Views.

Add package Install CSharpMath Install SkiaSharp

  1. After installation, open ViewController.cs.

Open file

  1. Add
var mathPainter = new CSharpMath.SkiaSharp.MathPainter(80) { LaTeX = "1+1=2", TextColor = SkiaSharp.SKColors.White };
var mathView = new SkiaSharp.Views.tvOS.SKCanvasView();
mathView.PaintSurface += (sender, e) =>
{
    e.Surface.Canvas.Clear();
    mathPainter.Draw(e.Surface.Canvas);
};
View = mathView;

below // Do any additional setup after loading the view. under the ViewDidLoad() method.

Add code

  1. Click the arrow button to run.

Result

  1. Discover what you can do