2012-09-18 24 views

回答

1

答案似乎是要檢測筆是否倒置。 http://msdn.microsoft.com/EN-US/library/ms607230(VS.110).aspx

(對聯想X61平板測試)

在MainWindow.Xaml

<TextBlock Name="textBox" 
     Text="Hello World!" HorizontalAlignment="Center" VerticalAlignment="Center" 
     StylusDown="TextBlock_StylusDown_1"/> 

在MainWindow.Xaml.cs

private void TextBlock_StylusDown_1(object sender, StylusDownEventArgs e) 
    { 
     if (e.Inverted) 
      textBox.Text = "I've been erased"; 
     else 
      textBox.Text = "Normal stylus"; 
    } 
+0

我寫相同的代碼但e.Inverted永遠都是虛假的。你認爲這是硬件問題嗎?我正在使用三星XE700T1A。 –

+0

更可能的驅動程序比硬件,但它是一種可能性。 – AlSki