import{_ as e,c as l,e as n,a as t,b as i,d as h,w as o,r,o as d}from"./app-DlzW8FTI.js";const p={};function c(k,s){const a=r("RouteLink");return d(),l("div",null,[s[3]||(s[3]=n(`
本文将介绍在进行 ClassIsland 相关开发时需要了解的一部分基础概念。
在 XAML 中使用程序集 ClassIsland.Core 下封装的一些控件时,需要引入对应的 XML 命名空间,如下方代码所示:
<ci:MyWindow x:Class="ClassIsland.Views.FeatureDebugWindow"
xmlns="https://github.com/avaloniaui"
xmlns:ci="http://classisland.tech/schemas/xaml/core">
<!-- ... -->
</ci:MyWindow >http://classisland.tech/schemas/xaml/core 命名空间的前缀默认是 ci ,包含了以下的 CLR 命名空间,在引用这个命名空间时会自动包含以下命名空间中的控件。
如果您要对 ClassIsland 本体进行修改,在 ClassIsland 程序集下的命名空间,需要手动按照 CLR 命名空间进行引用:
<ci:MyWindow x:Class="ClassIsland.Views.FeatureDebugWindow"
xmlns="https://github.com/avaloniaui"
xmlns:ci="http://classisland.tech/schemas/xaml/core"
xmlns:controls="clr-namespace:ClassIsland.Controls">
<!-- ... -->
</ci:MyWindow >ClassIsland 使用了依赖注入设计模式。在定义一个服务时,您可以在服务的构造函数参数中指定要引用的服务依赖项,主机会在构造服务时自动传入依赖项。
要了解关于依赖注入的更多内容,请参阅.NET 依赖项注入。这篇文档会更详细地介绍 .NET 中依赖注入的相关信息。
`,14)),t("p",null,[s[1]||(s[1]=i("如果您正在开发 ClassIsland 的插件,您还应该留意文档")),h(a,{to:"/en-us/dev/plugins/basics.html#%E4%BE%9D%E8%B5%96%E6%B3%A8%E5%85%A5"},{default:o(()=>s[0]||(s[0]=[i("插件基础知识")])),_:1}),s[2]||(s[2]=i(" 的依赖注入章节中,与在开发应用本体中不同的操作。"))])])}const g=e(p,[["render",c]]),u=JSON.parse('{"path":"/en-us/dev/basics.html","title":"基础知识","lang":"en-US","frontmatter":{"description":"基础知识 本文将介绍在进行 ClassIsland 相关开发时需要了解的一部分基础概念。 XML 命名空间 在 XAML 中使用程序集 ClassIsland.Core 下封装的一些控件时,需要引入对应的 XML 命名空间,如下方代码所示: http://classisland.tech/schemas/xaml/core 命名空间的前缀默认是 ci ...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"基础知识\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-12-14T02:59:03.000Z\\",\\"author\\":[{\\"@type\\":\\"Person\\",\\"name\\":\\"ClassIsland 社区\\",\\"url\\":\\"https://classisland.tech\\"}]}"],["meta",{"property":"og:url","content":"https://docs.classisland.tech/en-us/dev/basics.html"}],["meta",{"property":"og:site_name","content":"ClassIsland Documentation"}],["meta",{"property":"og:title","content":"基础知识"}],["meta",{"property":"og:description","content":"基础知识 本文将介绍在进行 ClassIsland 相关开发时需要了解的一部分基础概念。 XML 命名空间 在 XAML 中使用程序集 ClassIsland.Core 下封装的一些控件时,需要引入对应的 XML 命名空间,如下方代码所示: http://classisland.tech/schemas/xaml/core 命名空间的前缀默认是 ci ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-12-14T02:59:03.000Z"}],["meta",{"property":"article:modified_time","content":"2025-12-14T02:59:03.000Z"}]]},"git":{"createdTime":1719648014000,"updatedTime":1765681143000,"contributors":[{"name":"WRC","username":"WRC","email":"hello_wrc@outlook.com","commits":6,"url":"https://github.com/WRC"},{"name":"hello8693","username":"hello8693","email":"1320998105@qq.com","commits":1,"url":"https://github.com/hello8693"}]},"readingTime":{"minutes":1.28,"words":385},"filePathRelative":"en-us/dev/basics.md","autoDesc":true}');export{g as comp,u as data};