Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

XAML Parser / Compiler Bug

$
0
0

Just discovered that a extra '>' can slip through compilation and cause a runtime crash.

I have a DataTemplate in Resources that looks like this:

<ResourceDictionary>
            <converters:BooleanToObjectConverter x:Key="BooleanToObjectConverter" TrueValue="Picked"
                                                 FalseValue="To Pick">
            </converters:BooleanToObjectConverter>
            <DataTemplate x:Key="PickedHeaderTemplate">
                <ViewCell>
                    <StackLayout 
                        Padding="10,0,0,0"
                        HorizontalOptions="FillAndExpand"
                        Orientation="Horizontal"
                        BindingContext="{Binding Source={x:Reference LotsListView}, Path=BindingContext}">
                        <Label
                            Text="Picked"
                            HorizontalOptions="Start"/>
                        <Label
                            Text="{Binding PickedLotsLabel, StringFormat ='{0}'}"
                            HorizontalOptions="EndAndExpand"/>
                    </StackLayout> >
                </ViewCell>
            </DataTemplate>

The extra '>' in 'Stacklayout' causes the crash.

Thanks.


Viewing all articles
Browse latest Browse all 89864

Trending Articles