镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
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

Welcome to the CSharpMath wiki!

This has now reached the point where the Quadratic Formula looks reasonable on iOS:

Quadratic Formula

Clone this wiki locally