Jarryd
Topic Author
Posts: 13
Joined: 05 Sep 2023, 07:25

How to do I make Noeisis Ignore chunks of XAML?

12 Feb 2024, 22:46

So I can use this to make XAML appear only in the designer:
mc:Ignorable="d" 
<d:Rectangle x:Name="DebugRect" Fill="Red"/>
I want to make something almost identical, but it only works when my XAML is parsed, and running in my game.
noesis:Ignore="n"
<n:Rectangle x:Name="DebugRect" Fill="Red"/>
This way, I could run and debug my XAML in Blend. But there's chunks of xaml here that do not appear in the game.
Like filling in a background to be specific color when in blend, but it's transparent in game.

Would this be hard for me to create?
 
User avatar
jsantos
Site Admin
Posts: 3875
Joined: 20 Jan 2012, 17:18
Contact:

Re: How to do I make Noeisis Ignore chunks of XAML?

15 Feb 2024, 18:56

I don't think that's possible to implement on your side. But I am not sure if I am following you, if you want to "debug my XAML in Blend", you can use the d: namespace right? Only Blend parses these blocks.
 
Jarryd
Topic Author
Posts: 13
Joined: 05 Sep 2023, 07:25

Re: How to do I make Noeisis Ignore chunks of XAML?

16 Feb 2024, 06:02

In my workflow, I have my XAML decoupled from the game.

The game is a C++ based title using the unamanaged SDK. Here lives the code behinds, and View models that are part of the actual game.

I also have my workspace.sln, and duplicate implementations of my code behinds, and view models in C#.

Both share the exact same XAML files.

This approach is set out by the Noesis samples, and lets me test and iterate while avoiding setting up complex gameplay states required to make something in my UI happen.
Even with a console and debug hooks, just hitting RUN in blend instead is fastest. And I can use really simple input to mock set values normally done by gameplay events.

So XAML in my workflow, has three states.
Previewed in the designer,
Running in Blend.
Running in the game.

Sure I can add some values to my view models, and collapse things I don't want to see in gameplay.
But a variant of the d: syntax I can use to make chunks of XAML completely ignored by Noesis in my game would be a big help.

Who is online

Users browsing this forum: No registered users and 0 guests