Error thrown in simulator with style

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Mark Stega
Posts: 4
Joined: Wed Oct 07, 2015 2:10 pm

Error thrown in simulator with style

Postby Mark Stega » Tue Nov 22, 2016 11:23 am

I am trying to port the Silverlight navigation app to C#/XAML as the Silverlight application that I really want to port is based on this template. As part of the process I am using as many of the styles defined in the nav app.

The use of the style is

Code: Select all

                <ContentControl Style="{StaticResource LogoIcon}" />


The style causes an IndexOutOfRange exception in styles.xaml.g.cs

Code: Select all

    <!-- Logo Icon Style -->
    <Style x:Key="LogoIcon"
           TargetType="ContentControl">
        <Setter Property="Height"
                Value="24" />
        <Setter Property="Width"
                Value="24" />
        <Setter Property="Margin"
                Value="0,1,10,0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <Path UseLayoutRounding='False'
                              Fill="{StaticResource HighLightColorBrush}"
                              Stretch="Fill"
                              Data="M8,0 C12.417931,2.8898596E-06 16,3.5814998 16,8 C16,12.417819 12.41803,16 8,16 C3.5816212,16 6.1398991E-06,12.417912 0,8 C1.5351338E-06,6.8954077 0.22386749,5.8431153 0.62867981,4.8860393 C0.65398115,4.82622 0.6799894,4.7667723 0.70669389,4.7077074 L0.73170543,4.6541386 L5.6357112,9.5581446 L3.7429986,11.450858 L3.7429986,11.493001 L11.669835,11.493001 L11.669835,3.5661643 L11.627691,3.5661643 L9.7349787,5.4588776 L4.8993444,0.62324351 L5.0666013,0.55490673 C5.5510159,0.36389247 6.0585575,0.21878535 6.5838675,0.12495131 C6.8465204,0.078035071 7.1136146,0.043936942 7.3844767,0.023327276 C7.5199089,0.013022465 7.6562829,0.0060896641 7.7935166,0.0026129775 C7.862133,0.00087448902 7.9309645,4.5157563E-08 8,0 z" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


The exception occurs on the following line of code:

Code: Select all

Path_e1998e89e1b140b0b92d3e23b8517540.Data = (global::Windows.UI.Xaml.Media.Geometry)global::DotNetForHtml5.Core.TypeFromStringConverters.ConvertFromInvariantString(typeof(global::Windows.UI.Xaml.Media.Geometry), @"M8,0 C12.417931,2.8898596E-06 16,3.5814998 16,8 C16,12.417819 12.41803,16 8,16 C3.5816212,16 6.1398991E-06,12.417912 0,8 C1.5351338E-06,6.8954077 0.22386749,5.8431153 0.62867981,4.8860393 C0.65398115,4.82622 0.6799894,4.7667723 0.70669389,4.7077074 L0.73170543,4.6541386 L5.6357112,9.5581446 L3.7429986,11.450858 L3.7429986,11.493001 L11.669835,11.493001 L11.669835,3.5661643 L11.627691,3.5661643 L9.7349787,5.4588776 L4.8993444,0.62324351 L5.0666013,0.55490673 C5.5510159,0.36389247 6.0585575,0.21878535 6.5838675,0.12495131 C6.8465204,0.078035071 7.1136146,0.043936942 7.3844767,0.023327276 C7.5199089,0.013022465 7.6562829,0.0060896641 7.7935166,0.0026129775 C7.862133,0.00087448902 7.9309645,4.5157563E-08 8,0 z");

Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 2 guests