点击按钮我遇到了一个奇怪的问题。当我点击一个按钮时,除非我在释放左按钮之前移动鼠标,否则它不会被注册为单击。以下是我在新程序中使用的内容,用于验证我在我正在编写的程序中没有做任何事情。
我正在使用Raspberry Pi 2并构建版本10.0.16212.1000
XAML:
<Page
x:Class="App1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App1"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Button x:Name="button" Content="Button" HorizontalAlignment="Left" Margin="175,216,0,0" VerticalAlignment="Top" Click="button_Click"/>
</Grid>
</Page>
C#:
namespace App1
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
private void button_Click(object sender, RoutedEventArgs e)
{
Debug.WriteLine("Button Clicked");
}
}
}