protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) { canBeEdit = isParentSelected; // base呼び出しで選択される前に判定 clickedEditBlock = this; base.OnMouseLeftButtonDown(e); }
// ダブルクリック判定時間まで待機して シングルクリックが確定したら編集開始 // 編集開始までにワンテンポラグがある(エクスプローラと同じ) private static void Timer_Tick(object sender, EventArgs e) { timer.Stop(); if (!clickedEditBlock.canBeEdit) { return; } clickedEditBlock.IsEditing = true; clickedEditBlock = null; }