使用属性" Tapped"在ViewCell中不起作用(Xamarin Forms)

时间:2017-12-26 18:57:32

标签: c# xamarin xamarin.forms xamarin.ios tableview

每当我尝试在点击表格中的ViewCell时触发事件时,我都会遇到问题。我注意到有属性" Tapped"在Xamarin.Forms' x:Bind但在模拟器中,这只能在十次中的一次中随机工作。

这是我的XAML代码:

ViewCell

这是我的处理程序:

<TableSection Title="Settings" x:Name="settingsTableSection">
            <ViewCell Tapped="Handle_Tapped">
                 <StackLayout x:Name="weeklyDoseCell" Orientation="Horizontal" Padding="13, 0">
                    <Label Text="Redox weekly Dose" VerticalOptions="Center"></Label>  
                    <Label x:Name="weeklyDoseLabel" VerticalOptions="Center" Text="2.10" HorizontalOptions="EndAndExpand"></Label> 
                </StackLayout> 
            </ViewCell> 
</TableSection>

有没有人在我的代码中看到问题?

提前致谢!

编辑:我刚刚意识到只有当我按下Cell的底部(大约底端的1/5)才会触发它。知道如何解决这个问题吗?

0 个答案:

没有答案