As far as I know, InnerClass are very similar to Class.
But, apparently I can’t add properties to it.
I keep getting Element was referenced before it was initialized
.
Are InnerClass able to receive properties?
Am I doing something wrong?
Small test case:
<App>
<DockPanel>
<Panel ux:Name="statusPanel" Color="#f00" Height="80" Dock="Top"/>
<WhileTrue ux:Name="toggleStatusPanel">
<Change statusPanel.Color="#0f0" />
</WhileTrue>
<Panel ux:InnerClass="MyInnerClass" Height="80" Color="Blue" Margin="5">
<string ux:Property="Text" />
<Text Value="{ReadProperty Text}" />
<Clicked>
<Toggle Target="toggleStatusPanel" />
</Clicked>
</Panel>
<StackPanel>
<MyInnerClass Text="Hello"/>
<MyInnerClass />
<MyInnerClass />
<MyInnerClass />
</StackPanel>
</DockPanel>
</App>
Here is an old Post related -->
https://www.fusetools.com/community/forums/howto_discussions/element_was_referenced_before_it_was_initialized_s?page=1&highlight=998291e3-3190-4a71-901b-c84bc54b333d#post-998291e3-3190-4a71-901b-c84bc54b333d