UXDivers / Gorilla-Player-Support

This is the public Gorilla Player support website
http://gorillaplayer.com
115 stars 17 forks source link

Error, Xaml : Position 106:54. Expected Setter but found Xamarin.Forms.Label #331

Open rootSectornet opened 5 years ago

rootSectornet commented 5 years ago

Error, Xaml : Position 106:54. Expected Setter but found Xamarin.Forms.Label i have this error, but my code just have 104 line

<?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Tootanium.TooWork.IntroTooWork" xmlns:CSControl="clr-namespace:Tootanium.TooHelper.control;assembly=Tootanium" xmlns:Costum="clr-namespace:Tootanium.TooWork.CustomRenderer" Title="Login">

<ContentPage.Content>
    <StackLayout  Padding="10" VerticalOptions="CenterAndExpand">
        <StackLayout.Resources>
            <ResourceDictionary>
                <Style x:Name="FrameStyle" TargetType="Frame">
                    <Setter Property="Margin" Value="20"/>
                    <Setter Property="HasShadow" Value="True"/>
                    <Setter Property="CornerRadius" Value="5"/>
                    <Setter Property="VisualStateManager.VisualStateGroups">
                        <VisualStateGroupList x:Name="FrameGroupListVSG">
                            <VisualStateGroup>
                                <VisualState x:Name="Normal">
                                    <VisualState.Setters>
                                        <Setter Property="BackgroundColor" Value="{DynamicResource AppBackgroundColor}"/>
                                        <Setter Property="IsEnabled" Value="True"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <VisualState.Setters>
                                        <Setter Property="BackgroundColor" Value="LightYellow"/>
                                        <Setter Property="IsEnabled" Value="True"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <VisualState.Setters>
                                        <Setter Property="BackgroundColor" Value="{DynamicResource AppBackgroundColor}"/>
                                        <Setter Property="IsEnabled" Value="False"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Invalid">
                                    <VisualState.Setters>
                                        <Setter Property="BackgroundColor" Value="LightCoral"/>
                                        <Setter Property="IsEnabled" Value="True"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateGroupList>
                    </Setter>
                </Style>
            </ResourceDictionary>
        </StackLayout.Resources>
        <Image Source="tooworktrans" 
               WidthRequest="250"
               VerticalOptions="Center"
               HorizontalOptions="Center"
               Margin="0,0,0,30">
        </Image>

        <Costum:CostumFrame HasShadow="true" Padding="0" Margin="0" HorizontalOptions="CenterAndExpand" VerticalOptions="Center" BackgroundColor="White">
            <StackLayout VerticalOptions="FillAndExpand" HorizontalOptions="EndAndExpand" Padding="0" Spacing="0">
                <BoxView HeightRequest="4" 
                         BackgroundColor="{DynamicResource AccentColor}"
                         HorizontalOptions="FillAndExpand"/>
                <StackLayout Padding="10" Spacing="20">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="40"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Label Text="Login to tooWork Account" Grid.Row="0" Grid.Column="0" FontSize="Small" TextColor="{DynamicResource SecondaryTextColor}"/>
                        <Label Text="&#xf19a;" Grid.Row="0" Grid.Column="1" FontSize="Medium" TextColor="#333" Style="{DynamicResource MyLineAwesome}">
                            <Label.GestureRecognizers>
                                <TapGestureRecognizer Tapped="OpenMenuPopup" NumberOfTapsRequired="1" />
                            </Label.GestureRecognizers>
                        </Label>
                    </Grid>

                <CSControl:FAEntry  x:Name="Username"
                                    InnerIcon="&#xf406;"
                                    IsTitleVisible="False"
                                    InnerFrameStyle="{DynamicResource FrameStyle}"
                                    InnerPlaceHolder="Username"/>

                <CSControl:FAEntry  x:Name="Password"
                                    InnerIcon="&#xf023;"
                                    InnerPlaceHolder="Password"
                                    InnerFrameStyle="{DynamicResource FrameStyle}"
                                    IsTitleVisible="False"
                                    IsPass="True"/>

                    <Button x:Name="LoginBtn"
                            Style="{DynamicResource ButtonStyle}"
                            Text="Sign In"
                            BorderRadius="8"
                            Clicked="btnLogin_clicked"
                            />
                </StackLayout>
            </StackLayout>
        </Costum:CostumFrame>
    </StackLayout>
</ContentPage.Content>

arappl-merc commented 4 years ago

I too encountered this annoying issue, which caused me increased time trying to find the issue. In my case the line position (106:54) were in reference to the exception within the control in the xaml. In your case maybe a control that contains or inherits Label, maybe your CSControl:FAEntry. It is not hard to recreate this issue and would be great if it was fixed.