0

To share a common display layout in a Split template Windows Store app, I put a Back button, title TextBlock, and another button in a UserControl, and then use that control in most of my pages. My problem is that in the main page, neither of the buttons will react to pointer activity, be it pointer over or clicking. However, it works fine in any other page. To isolate it, I created a blank app and duplicated the UserControl, but it works in that case.

How can I debug this?

Thanks.

-John

4

1 回答 1

0

在“拆分”模板应用的“ItemView”页面中,包含后退按钮和标题的 Grid 必须位于 XAML 代码中的 GridView 和 ListView 下方。显然 GridView,没有 Grid.Row,并且 Grid.RowSpan="2" 需要覆盖第一行和第二行,如果按钮在 GridView 下方,它必须假设它不可见,不需要响应事件。我将我的新用户控件实例移动到 GridView 下方,按钮现在可以使用。

覆盖两行的整个方案对我来说毫无意义,但是如果没有 Grid.RowSpan="2",这些项目对我来说不会很好地分成两行。我认为这种奇怪的布局应该在模板中进行解释。也许它可以将其他人从同样的问题中拯救出来。

于 2013-03-29T13:47:25.770 回答