Binding & IvalueConverter is Not Working on ListView Header

KarthikeyanSekarKarthikeyanSekar USMember ✭✭
edited June 2017 in Xamarin.Forms

Binding & IvalueConverter is Not Working on ListView Header
When use string Binding its bind on ui but using IsEnabled,IsVisible,HeightRequest,WidthRequest doesnt Working

VIEW.XAML

 <ListView.GroupHeaderTemplate>
                <DataTemplate>
                    <ViewCell x:Name="groupHeader">

                        <Grid RowSpacing="0" ColumnSpacing="0"  Margin="0"  BackgroundColor="#F6F6F6">
                            <Grid.GestureRecognizers>
                                <TapGestureRecognizer></TapGestureRecognizer>
                            </Grid.GestureRecognizers>
                            <Grid.Padding>
                                <OnPlatform x:TypeArguments="Thickness">
                                    <OnPlatform.Android>20,15,20,15</OnPlatform.Android>
                                    <OnPlatform.iOS>20,5,20,5</OnPlatform.iOS>
                                </OnPlatform>
                            </Grid.Padding>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="*"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                                <ColumnDefinition Width="Auto"></ColumnDefinition>
                            </Grid.ColumnDefinitions>
                            <Button Grid.Row="0" BorderRadius="0"   BackgroundColor="Transparent"
                                        Clicked="groupHeader_Tapped" 
                                        CommandParameter="{Binding .}"    
                                        Grid.Column="0"  Image="{Binding StateIcon}" 
                                        WidthRequest="40" HeightRequest="40" 
                                        ContentLayout="Top,5" 
                                        HorizontalOptions="Center" 
                                        Margin="0,0,0,0" >
                            </Button>
                            <Label Grid.Row="0" Margin="10,0,0,0" YAlign="Center"  Grid.Column="1" Text="{Binding Header}" TextColor="#08508e">
                                <Label.FontFamily>
                                    <OnPlatform x:TypeArguments="x:String">
                                        <OnPlatform.iOS>Proxima Nova Regular</OnPlatform.iOS>
                                        <OnPlatform.Android>Proxima-Nova-Regular.ttf#Proxima Nova Regular</OnPlatform.Android>
                                        <OnPlatform.WinPhone></OnPlatform.WinPhone>
                                    </OnPlatform>
                                </Label.FontFamily>
                                <Label.FontSize>
                                    <OnPlatform x:TypeArguments="x:Double">
                                        <OnPlatform.iOS>14</OnPlatform.iOS>
                                        <OnPlatform.Android>14</OnPlatform.Android>
                                        <OnPlatform.WinPhone></OnPlatform.WinPhone>
                                    </OnPlatform>
                                </Label.FontSize>
                            </Label>
                            <StackLayout Grid.Row="0" Grid.Column="2" IsVisible="{Binding RTREnable, Converter={StaticResource RTRNABooleanConverter}}">
                                <local:CustomCheckBox  DefaultText="NA" CheckedChanged="onCheckedChanged" 
                                                  TextColor="Gray" FontSize="12" ClassId="{Binding Header}" 
                                                  CommandParameter="{Binding .}" 
                                                  ></local:CustomCheckBox>
                            </StackLayout>
                        </Grid>
                    </ViewCell>

                </DataTemplate>
            </ListView.GroupHeaderTemplate>

Best Answer

Answers

Sign In or Register to comment.