DataTrigger is not working on DataTemplate

Shadow_CodderShadow_Codder AUMember ✭✭
edited September 2016 in Xamarin.Forms

`
<ListView.ItemTemplate>

                <Grid Padding="5,5,5,0" ColumnSpacing="5" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <!---Left Column Content -->
                    <template:ProductListingTemplate
                        BindingContext="{Binding Left}"
                        Grid.Column="0">
                        <template:ProductListingTemplate.GestureRecognizers>
                            <TapGestureRecognizer Tapped="OnProductTapped" />
                        </template:ProductListingTemplate.GestureRecognizers>
                    </template:ProductListingTemplate>

                    <!-- Right Column Content-->
                    <template:ProductListingTemplate
                        BindingContext="{Binding Right}"
                        Grid.Column="1">
                        <template:ProductListingTemplate.Triggers>
                            <DataTrigger TargetType="template:ProductListingTemplate"
                                        Binding="{Binding Id}}"
                                        Value="0">
                                <Setter Property="IsVisible" Value="False"/>
                            </DataTrigger>
                        </template:ProductListingTemplate.Triggers>
                        <template:ProductListingTemplate.GestureRecognizers>
                            <TapGestureRecognizer Tapped="OnProductTapped"/>
                        </template:ProductListingTemplate.GestureRecognizers>
                    </template:ProductListingTemplate>

                </Grid>
            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>`

Hey Guys my Datatrigger is not working!!!

Sign In or Register to comment.