【发布时间】:2019-10-08 10:01:41
【问题描述】:
这可能是一个简单的解决方案,但由于某种原因我无法在线找到解决方案。
我有两种观点。一个视图是网格,另一个是按钮。 Grid View 显示不同的视图(boxview、label 等)
但在它下面是一个按钮视图。但是这个视图不包含在网格视图中。由于某些原因,我无法将其放入网格视图中。我只是想知道是否有可能在不移动视图的情况下点击它,或者即使它上面有视图?
它是这样的:
<?xml version="1.0" encoding="UTF-8" ?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="PlayUIArea.NotificationConfirmView">
<ContentView.Content>
<Grid BackgroundColor="Blue">
<BoxView
WidthRequest="100"
VerticalOptions="Fill"
HorizontalOptions="Start"
BackgroundColor="Black" />
<Button Text="Confirm"
OnClick="Button_Click"
VerticalOptions="Start"
HorizontalOptions="Center" />
<Grid BackgroundColor="Red" Margin="100,0,0,0" Padding="-100,0,0,0">
<Label Text="Label Here"
HorizontalOptions="Center"
VerticalOptions="Center" />
</Grid>
</Grid>
</ContentView.Content>
</ContentView>
有没有办法让它可以点击?
【问题讨论】:
标签: c# visual-studio xamarin xamarin.forms