ListViewBase.IsSwipeEnabled 屬性

定義

取得或設定值,這個值表示檢視是否支援 撥動 互動的離散輸入處理。

public:
 property bool IsSwipeEnabled { bool get(); void set(bool value); };
bool IsSwipeEnabled();

void IsSwipeEnabled(bool value);
public bool IsSwipeEnabled { get; set; }
var boolean = listViewBase.isSwipeEnabled;
listViewBase.isSwipeEnabled = boolean;
Public Property IsSwipeEnabled As Boolean
<listViewBase IsSwipeEnabled="bool" .../>

屬性值

Boolean

bool

如果啟用撥動互動的離散輸入處理,則為true;否則為false。 預設值為 True

備註

將 IsSwipeEnabled 設定為 false 會停用一些預設觸控互動,因此當需要這些互動時,它應該設定為 true 。 例如:

  • 如果已啟用專案選取,且您將 IsSwipeEnabled 設定為 false,則使用者可以以滑鼠右鍵按一下滑鼠來取消選取專案,但無法使用 動手勢取消選取具有觸控的專案。
  • 如果您將 CanDragItems 設定為 true ,並將 IsSwipeEnabled 設定為 false,則使用者可以使用滑鼠拖曳專案,但不能使用觸控。
  • 如果您將 CanReorderItems 設定為 true ,並將 IsSwipeEnabled 設定為 false,則使用者可以使用滑鼠重新排序專案,但不能使用觸控。

當檢視中的專案不支援使用動手勢的互動時,您通常會將 IsSwipeEnabled 設定為false來停用動動畫,例如取消選取、拖曳和重新排序。 不需要動畫時停用動畫可以改善應用程式的效能。

適用於

另請參閱