_Explorer.ClearSelection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Cancels any selection in the active explorer.
public:
void ClearSelection();
public void ClearSelection ();
Public Sub ClearSelection ()
Remarks
After the ClearSelection method is called, the Count property of the Selection object that the Selection property returns is zero. Then, the SelectionChange event fires unless prior to calling of ClearSelection, the current view did not contain any items, the current folder was empty, or the Count property was already zero.
If the Reading Pane is visible and the current view is a table view, calling ClearSelection renders the Reading Pane blank.
If the current view or current folder does not contain any items, calling ClearSelection does not result in any change to the selection and does not fire the SelectionChange event.
ClearSelection returns an error if the item is being edited in the current view.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應