From 754f4589a1724ee2a5e44b527160f6d56fdd7429 Mon Sep 17 00:00:00 2001 From: sharpchen Date: Tue, 22 Oct 2024 16:13:30 +0800 Subject: [PATCH] gggggg --- ...Xml namespace.md => 2. XAML Essentials.md} | 22 +++++++++---------- .../1. Fundamentals/3. MVVM Essentials.md | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) rename docs/document/Avalonia/docs/1. Fundamentals/{2. Xml namespace.md => 2. XAML Essentials.md} (74%) diff --git a/docs/document/Avalonia/docs/1. Fundamentals/2. Xml namespace.md b/docs/document/Avalonia/docs/1. Fundamentals/2. XAML Essentials.md similarity index 74% rename from docs/document/Avalonia/docs/1. Fundamentals/2. Xml namespace.md rename to docs/document/Avalonia/docs/1. Fundamentals/2. XAML Essentials.md index 1803e158..dcc44439 100644 --- a/docs/document/Avalonia/docs/1. Fundamentals/2. Xml namespace.md +++ b/docs/document/Avalonia/docs/1. Fundamentals/2. XAML Essentials.md @@ -1,4 +1,4 @@ -# Xml namespace +# XAML Essentials ## Importing a namespace @@ -6,7 +6,7 @@ The semantic of `xmlns:x` basically means importing a namespace as an alias name Then we can use `:` to access the members of the namespace. `x:Class` binds the code behind(`.axaml.cs`) the AXAML(not the ViewModel!). -```xml{2,3} +```xml ``` -## Default xml namespace +## Spreading Namespace -The default namespace is imported without name, which mean its members are imported globally in this AXAML file, we can access them without any prefix. +The default namespace is imported without name, which mean its members are imported globally in this AXAML file, can be accessed them without any prefix. Generally the default is avalonia namespace which contains built-in components like `Button`, `TextBlock`. -```xml{1} - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="AvaloniaApplication.App" xmlns:local="using:AvaloniaApplication" @@ -31,20 +31,20 @@ Generally the default is avalonia namespace which contains built-in components l ``` -## Project namespace +## Import from Project Namespace -`using:AvaloniaApplication` imports the namespace from **specific project**, so `local:` is available to access the types from the project. +`using:` imports the namespace from **specific project** with the alias name `local` -```xml{4,8-10} +```xml RequestedThemeVariant="Default"> - + ``` diff --git a/docs/document/Avalonia/docs/1. Fundamentals/3. MVVM Essentials.md b/docs/document/Avalonia/docs/1. Fundamentals/3. MVVM Essentials.md index ac969bca..ff23d47b 100644 --- a/docs/document/Avalonia/docs/1. Fundamentals/3. MVVM Essentials.md +++ b/docs/document/Avalonia/docs/1. Fundamentals/3. MVVM Essentials.md @@ -1,4 +1,4 @@ -# +# MVVM Essentials ```mermaid graph TD;