Merge pull request #222 from sabuto/master

Updated sytanx highlighting
This commit is contained in:
Max Katz 2022-03-23 17:51:06 -04:00 коммит произвёл GitHub
Родитель 26e4386aca 6ba666b527
Коммит ff8db62889
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
12 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@ -98,7 +98,7 @@ Render transforms applied to controls using CSS-like syntax can be transitioned.
{% endtab %}
{% tab title="C\#" %}
```text
```csharp
new Border
{
Width = 100,

Просмотреть файл

@ -2,13 +2,13 @@
[ReactiveUI](https://reactiveui.net/) is an advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. Avalonia ships its own fork of [ReactiveUI](https://reactiveui.net/) in the `Avalonia.ReactiveUI` NuGet package. To use ReactiveUI and the the [MVVM Pattern](https://msdn.microsoft.com/en-us/library/hh848246.aspx) in your Avalonia solutions, add the package to your project via NuGet package manager GUI or execute the following command:
```text
```bash
dotnet add package Avalonia.ReactiveUI
```
`Avalonia.ReactiveUI` includes Avalonia-specific helpers to handle [view model-based routing](https://reactiveui.net/docs/handbook/routing), [view activation](https://reactiveui.net/docs/handbook/when-activated/) and [scheduling](https://reactiveui.net/docs/handbook/scheduling/). Be sure to add `.UseReactiveUI()` to your `AppBuilder` before you use any of ReactiveUI's APIs in your application.
```text
```csharp
public static class Program
{
public static void Main(string[] args) => BuildAvaloniaApp().Start<MainWindow>();

Просмотреть файл

@ -31,7 +31,7 @@ public class ViewModel : ReactiveObject, IActivatableViewModel
This is the UI for the view model you see above.
```csharp
```markup
<Window xmlns="https://github.com/avaloniaui"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Background="#f0f0f0" FontFamily="Ubuntu"

Просмотреть файл

@ -81,7 +81,7 @@ When we work via FrameBuffer there are no windows, so we need a separate view (U
counterpart to the normal window.
`MainView` will be our app base in which we develop our UI:
```xaml
```markup
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@ -103,7 +103,7 @@ counterpart to the normal window.
```
Now create a new UserControl with name `MainSingleView` and host the `MainView`:
```xaml
```markup
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
@ -118,7 +118,7 @@ Now create a new UserControl with name `MainSingleView` and host the `MainView`:
```
Also change the `MainWindow.axaml` to host the `MainView` inside:
```xaml
```markup
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

Просмотреть файл

@ -12,31 +12,31 @@ You can follow [this guide](https://blogs.msdn.microsoft.com/david/2017/07/20/se
* Install `curl`, `libunwind8`, `gettext` and `apt-transport-https`. The `curl` and `apt-transport-https` often are up-to-date.
```text
```bash
sudo apt-get install curl libunwind8 gettext apt-transport-https
```
* Download tar-ball.
```text
```bash
curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-arm.tar.gz
```
* Unpack tarball to `/opt/dotnet`.
```text
```bash
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
```
* Link `dotnet` binary.
```text
```bash
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
```
Alternative: You can login as superuser \(run "sudo su"\)
```text
```bash
apt-get -y install curl libunwind8 gettext apt-transport-https
curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/release/2.0.0/dotnet-runtime-latest-linux-arm.tar.gz
mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
@ -57,7 +57,7 @@ It includes the `libSkiaSharp.so`.
* Now publish the app with the following command:
```text
```bash
dotnet publish -r linux-arm -f netcoreapp2.0
```

Просмотреть файл

@ -12,7 +12,7 @@ You can make changes in Xcode and compile using Cmd+B. You will then need to poi
You then specify this path in your AppBuilder using:
```text
```csharp
.With(new AvaloniaNativePlatformOptions
{
AvaloniaNativeLibraryPath = “[Path to your dylib]”,
@ -35,7 +35,7 @@ A solution to this is to change the sample's output path to [resemble an app bun
And in the `Contents` output directory place a valid `Info.plist` file. An example for ControlCatalog.NetCore is:
```text
```xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

Просмотреть файл

@ -6,13 +6,13 @@ Assuming you have created a project called `HelloWord`. Enter the directory `Hel
To build the project for Andoird run the following command.
```
```bash
dotnet build
```
To run the project in a simulator, run the following command.
```
```bash
dotnet run
```

Просмотреть файл

@ -36,7 +36,7 @@ This has a command line based SDK manager that can be used to install the SDK.
There is also a tool in development called maui check that can do all of this for you automatically:
```
```bash
dotnet tool install -g Redth.Net.Maui.Check
maui-check
```

Просмотреть файл

@ -16,7 +16,7 @@ Once the templates are installed you can generate a new project.
Create a folder name that matches the name of your project. Then enter that folder.
```
```bash
mkdir HelloWorld
cd HelloWorld
```
@ -25,7 +25,7 @@ cd HelloWorld
Now create a cross platform solution using the templates.
```
```bash
dotnet new avalonia.xplat
```

Просмотреть файл

@ -6,13 +6,13 @@ Assuming you have created a project called `HelloWord`. Enter the directory `Hel
To build the project for iOS run the following command.
```
```bash
dotnet build
```
To run the project in a simulator, run the following command.
```
```bash
dotnet run
```

Просмотреть файл

@ -52,7 +52,7 @@ If successful you may return to your IDE of choice and open the `info.plist` fil
12\. Now edit the `.iOS.csproj` file.
```
```xml
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
<CodesignKey>Apple Development: dan@walms.co.uk (3L323F7VSS)</CodesignKey>
```

Просмотреть файл

@ -10,7 +10,7 @@ First it is very important to install the correct [dotnet SDK](https://dotnet.mi
### Install the Workload
```
```bash
dotnet workload install ios
```