Skip to content

Commit

Permalink
zh-CN docs sync with latest upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenblue committed Nov 16, 2024
1 parent 4ce87ce commit a4cc36c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class ViewLocator : IDataTemplate

## Using the View Locator

By default, the View Locator is referenced in App.axaml as a DataTemplate, in the content of the `Application.DataTemplates` XAML tag. Ensure that its appropriate 'using' statement is in the `xmlns:local` property of the Application root tag.
默认情况下,视图定位器在 App.axaml 中作为 DataTemplate 引用,位于 `Application.DataTemplates XAML` 标签的内容中。确保在应用程序根标签的 `xmlns:local` 属性中包含其适当的 using 语句。

```xaml
<Application xmlns="https://github.com/avaloniaui"
Expand All @@ -63,6 +63,7 @@ By default, the View Locator is referenced in App.axaml as a DataTemplate, in th
xmlns:local="using:LearningAvalonia"
RequestedThemeVariant="Default">
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
<!-- "Default" ThemeVariant 是取决于系统的主题变体属性,"Dark" 和 "Light" 是另外可用的选项 -->
<Application.DataTemplates>
<local:ViewLocator />
</Application.DataTemplates>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ public static int Main(string[] args)
if (args.Contains("--drm"))
{
SilenceConsole();
return builder.StartLinuxDrm(args);
// 默认情况下,Avalonia会尝试自动检测输出的显卡设备,
// 但是你也可以指定一个,比如: "/dev/dri/card1"
return builder.StartLinuxDrm(args: args, card: null, scaling: 1.0);
}

return builder.StartWithClassicDesktopLifetime(args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ ln -s /opt/dotnet/dotnet /usr/local/bin

* 要在树莓派上运行 `Avalonia` 应用程序,您需要使用此 NuGet 包:

```
https://www.nuget.org/packages/Avalonia.Skia.Linux.Natives/1.68.0.2
```
[SkiaSharp.NativeAssets.Linux](https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux/)

其中包含 `libSkiaSharp.so`

Expand Down

0 comments on commit a4cc36c

Please sign in to comment.