CSharpXamlForHtml5.js?201712271432:14728 Uncaught TypeError: $T06(...).TryParse is not a function
at Object.TypeFromStringConverters_ConvertByteFromString (CSharpXamlForHtml5.js?201712271432:14728)
at Delegate_Invoke (JSIL.Core.js?201712271432:9346)
at Object.TypeFromStringConverters_ConvertFromInvariantString (CSharpXamlForHtml5.js?201712271432:14755)
at Calculator1_MainPage.MainPage_InitializeComponent (Calculator1.js?201712271432:661)
at Calculator1_MainPage.MainPage__ctor (Calculator1.js?201712271432:380)
at Calculator1_MainPage (Calculator1.MainPage:17)
at Calculator1_App.App__ctor (Calculator1.js?201712271432:135)
at Calculator1_App (Calculator1.App:17)
at runMain (index.html:32)
at browserFinishedLoadingCallback (JSIL.Browser.js?201712271432:1138)
thrown by:
function TypeFromStringConverters_ConvertByteFromString (str) {
var b = new JSIL.BoxedVariable(0);
if (!$T06()['TryParse'](str, /* ref */ b)) {
throw $S01().Construct(("Xaml exception: cannot convert \"" + str + "\" to byte. To fix the issue, please locate the error by looking for the first XAML file in the Stack Trace."));
}
return b.get();
};
Occurs when I have a rectangle with a set width, no height specified, in a stack panel that is stretched vertically, only if I specify the fill brush as a child element. For example, this code throws the above error. But if I comment out all of the Rectangle.Fill children and put Fill="red" as an attribute of the Rectangle definition, it works fine. The .Fill child works fine on rectangles that are not in the stack panel, so it's a bit of an oddity.
Code: Select all
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Stretch">
<Rectangle Width="5" Margin="15 0 0 0">
<Rectangle.Fill>
<SolidColorBrush>
<SolidColorBrush.Color>
<Color R="140" G="80" B="80" A="255"></Color>
</SolidColorBrush.Color>
</SolidColorBrush>
</Rectangle.Fill>
</Rectangle>
<Rectangle Width="95">
<!--<Rectangle.Fill>
<SolidColorBrush>
<SolidColorBrush.Color>
<Color R="80" G="0" B="0" A="255"></Color>
</SolidColorBrush.Color>
</SolidColorBrush>
</Rectangle.Fill>-->
</Rectangle>
<Rectangle Width="5" Margin="0 0 15 0">
<!--<Rectangle.Fill>
<SolidColorBrush>
<SolidColorBrush.Color>
<Color R="140" G="80" B="80" A="255"></Color>
</SolidColorBrush.Color>
</SolidColorBrush>
</Rectangle.Fill>-->
</Rectangle>
</StackPanel>
Thanks,
-Rick