我想將此代碼轉換爲Silverlight。任何關於更換鼠標類的建議?Silverlight鼠標類
private void AssociatedObject_GotFocus(object sender, RoutedEventArgs e)
{
if (Mouse.LeftButton == MouseButtonState.Released && Mouse.MiddleButton == MouseButtonState.Released && Mouse.RightButton == MouseButtonState.Released && Mouse.XButton1 == MouseButtonState.Released && Mouse.XButton2 == MouseButtonState.Released)
{
AssociatedObject.SelectAll();
_alreadyFocused = true;
}
}
我不喜歡這樣的解決方案。 CaptureMouse邏輯對我來說太脆弱了。 – 2011-03-17 20:18:26
@Jonathan - 嗯..我沒有說我喜歡它:-) – 2011-03-17 21:46:07