ContentControl not properly binding.
Posted: 03 Sep 2019, 08:08
I have the following XAML that is working in Unity and in the WebGL build, but not in Android:
(I only put the Background color, width and height in to see what was going on on Android--normally it sizes to the bound control)
I am setting ModalContent to a code-created UserControl in the ViewModel. Under the Unity editor and in WebGL, this works just fine, but in Android, all I get is a red 100 x 100 square.
Any specific reason Android wouldn't be binding this ContentControl properly? The control is obviously there since I see the red background, but it isn't rendering the UserControl like it does in the editor.
BTW, I updated to the latest Noesis 2.2.4 and Unity 2019.2 but that did not fix the problem.
EDIT: I was wrong, this ISN'T working in WebGL. So it only works in the editor, not in any builds. I must be doing something wrong. Anyone know what it could be?
Code: Select all
<Grid Background="Transparent" Visibility="{Binding ModalVisible, Converter={StaticResource BoolToVisConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentControl Grid.Row="1" Grid.Column="1" Content="{Binding ModalContent}" Background="Red" Width="100" Height="100"/>
</Grid>I am setting ModalContent to a code-created UserControl in the ViewModel. Under the Unity editor and in WebGL, this works just fine, but in Android, all I get is a red 100 x 100 square.
Any specific reason Android wouldn't be binding this ContentControl properly? The control is obviously there since I see the red background, but it isn't rendering the UserControl like it does in the editor.
BTW, I updated to the latest Noesis 2.2.4 and Unity 2019.2 but that did not fix the problem.
EDIT: I was wrong, this ISN'T working in WebGL. So it only works in the editor, not in any builds. I must be doing something wrong. Anyone know what it could be?