DataGridCheckBoxColumn.PrepareCellForEdit 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當欄位中的儲存格進入編輯模式時會被呼叫。
protected:
override System::Object ^ PrepareCellForEdit(System::Windows::FrameworkElement ^ editingElement, System::Windows::RoutedEventArgs ^ editingEventArgs);
protected override object PrepareCellForEdit(System.Windows.FrameworkElement editingElement, System.Windows.RoutedEventArgs editingEventArgs);
override this.PrepareCellForEdit : System.Windows.FrameworkElement * System.Windows.RoutedEventArgs -> obj
Protected Overrides Function PrepareCellForEdit (editingElement As FrameworkElement, editingEventArgs As RoutedEventArgs) As Object
參數
- editingElement
- FrameworkElement
欄位在編輯模式下顯示的儲存格元素。
- editingEventArgs
- RoutedEventArgs
關於導致儲存格進入編輯模式的使用者手勢資訊。
傳回
未經編輯的價值。
備註
當欄位中的一個儲存格DataGrid進入編輯模式時,控制項會PrepareCellForEdit呼叫該DataGridColumn方法。 類別 DataGridCheckBoxColumn 會覆寫此方法,立即回應使用者手勢,更新託管 CheckBox 控制項中的值。 這種即時回應是必要的,因為儲存 DataGridCheckBoxColumn 格進入編輯模式時,會使用相同的使用者手勢,改變其託管 CheckBox的狀態。