-
Notifications
You must be signed in to change notification settings - Fork 4
Windows
Windows are the only way to render something on stride with Avalonia. To allow good interaction with stride with added additional properties.
here an example of additional property
<Window xmlns="https://github.com/avaloniaui"
xmlns:s="clr-namespace:Stridelonia;assembly=Stridelonia.Avalonia"
s:WindowExtensions.RenderGroup="31">
</Window>
So let see what we have
It allows defining if your window is rendered to the screen or 3d space. By default your window will be on the screen
<Window xmlns="https://github.com/avaloniaui"
xmlns:s="clr-namespace:Stridelonia;assembly=Stridelonia.Avalonia"
s:WindowExtensions.Is2D="False">
</Window>
Allow changing the render group used by stride to render the window. You can use this to solve the problem of clean UI. default to render group 0
<Window xmlns="https://github.com/avaloniaui"
xmlns:s="clr-namespace:Stridelonia;assembly=Stridelonia.Avalonia"
s:WindowExtensions.RenderGroup="31">
</Window>
Basically the same as Z-index from CSS. Topmost will also work from Avalonia
<Window xmlns="https://github.com/avaloniaui"
xmlns:s="clr-namespace:Stridelonia;assembly=Stridelonia.Avalonia"
s:WindowExtensions.ZIndex="1">
</Window>
Define if the window will receive input events. by default is true
<Window xmlns="https://github.com/avaloniaui"
xmlns:s="clr-namespace:Stridelonia;assembly=Stridelonia.Avalonia"
s:WindowExtensions.HasInput="False">
</Window>
Actually, Position from Avalonia also work, but it hard to position something in 3d with a vector2 So Position3D is here Actually, converters do not work correctly. so it better to use code.
WindowExtensions.SetRenderGroup(this, 31);
Rotation3D is only for 3d space, but you can render transform from Avalonia(the best I could find) Same as Position3D is better to use code.
WindowExtensions.SetRotation3D(this, Quaternion.RotationY(360));