【发布时间】:2015-12-25 20:32:04
【问题描述】:
我有 Frame 和 Grid 的内容。当我将 contentWiew(带有内容)添加到 Grid 时,有两个选项:
1. 如果 contentWiew 有 BackgroundColor = "Transparent" 那么当我点击 contentWiew 时就会发生按下在 Frame 中(contentWiew 跳过它)。
2. 如果 contentWiew 有 BackgroundColor = NotTransparent (Red,Yellow) 那么当我点击 contentWiew > 按下发生在 contentWiew ()。
部分代码:
Label mainText = new Label { Text = "TestText", FontSize = 14 };
var contntView = new ContentView () { BackgroundColor = Color.Transparent , HorizontalOptions = LayoutOptions.End, VerticalOptions = LayoutOptions.Start };
contntView.Content = mainText;
mainGrid.Children.Add (contntView,0,1);
我需要准确地进行营业额 =) 当 ContentView 透明 - 抓住点击。当 ContentView 不透明 - 跳过点击到 Frame。
无论BackgroundColor如何,我如何控制这个过程?
【问题讨论】:
标签: xamarin xamarin.forms xamarin-studio