code-snippet-editor-plugin icon indicating copy to clipboard operation
code-snippet-editor-plugin copied to clipboard

Retrieving values from a node's children to display for that node

Open mikeysouthwell opened this issue 7 months ago • 3 comments

How do I get the name value of a child node and display that as the name for the parent node?

For example, I want to use the name "undo-icon-32p" of a child "VECTOR" node (the image) inside a unioned "BOOLEAN_OPERATION" node (the frame) with the name "union".

Can this be done with something like {{node.child.name}} or something similar?

*Note that I added cssFill in there for simplicity, this wouldn't actually be visible in the final code output, because the idea would be that the css.fill value for the parent node would be shown for the child node's "TintColor":

<Frame
Name="union"
WidthRequest="32px"
HeightRequest="32px"
cssFill="Var(IconsStrokeWhite, #FFF)"
>

<Image
Source="undo-icon-32p"
WidthRequest="32px"
HeightRequest="32px"
>
<Image.Behaviors>
cssFill=""Var(IconsStrokeBlack, #000)"
<toolkit:IconTintColorBehavior TintColor="Var(IconsStrokeWhite, #FFF)" />
</Image.Behaviors>
</Image>
</Frame>

mikeysouthwell avatar Jun 26 '24 06:06 mikeysouthwell