Forum Xamarin.Forms

Disable highlight on ViewCell tap

JassimRahmaJassimRahma USMember ✭✭✭✭

Hi,

How can I prevent the highlight happens when tapping on ViewCell without having to disable the the ViewCell (IsEnabled=false) because that will also disable the Tapping which I need..

Here is my XAML with Thanks..

<TableSection Title="Privacy">
    <ViewCell>
        <Grid x:Name="SettingsPrivacyGrid">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <Label Text="Show my Email" Grid.Row="0" Grid.Column="0" HorizontalOptions="FillAndExpand" />
            <Switch x:Name="SettingsSwitchShowMyEmail" Grid.Row="0" Grid.Column="1" Toggled="SettingsSwitchShowMyEmail_Toggled" />

            <Label Text="Show my Mobile" Grid.Row="1" Grid.Column="0" HorizontalOptions="FillAndExpand" />
            <Switch x:Name="SettingsSwitchShowMyMobile" Grid.Row="1" Grid.Column="1" Toggled="SettingsSwitchShowMyMobile_Toggled" />

            <Label Text="Others can Message Me" Grid.Row="2" Grid.Column="0" HorizontalOptions="FillAndExpand" />
            <Switch x:Name="SettingsSwitchOthersMessageMe" Grid.Row="2" Grid.Column="1" Toggled="SettingsSwitchOthersMessageMe_Toggled" />
        </Grid>
    </ViewCell>
</TableSection>

Best Answer

Answers

Sign In or Register to comment.