Razor支持

This commit is contained in:
小红帽
2024-01-08 17:37:26 +08:00
parent 9423dc2d1d
commit f86e000984
8 changed files with 122 additions and 55 deletions

View File

@@ -0,0 +1,4 @@
<Panel Width="500" Height="500" Background="#000"></Panel>
@code {
}

View File

@@ -1,7 +1,17 @@

<Panel Background="#f00" Width="100" Height="100">
<Panel Background="#00f" Width="20" Height="30"></Panel>
<Panel Background="#0ff" Width="20" Height="30" MarginLeft="0"></Panel>
<Panel Background="#00f" Width="20" Height="30" MouseDown="OnMouseDown">
</Panel>
@if (visible)
{
<Panel Background="#0f0" Width="20" Height="30" MarginLeft="10"></Panel>
}
</Panel>
@*<Button></Button>*@
@*<TestElement Test="123"></TestElement>*@
@code
{
bool visible = false;
void OnMouseDown()
{
visible = !visible;
}
}