共用方式為


ListBoxItem.OnSelected(RoutedEventArgs) 方法

定義

當在 ListBoxItem 內選取 ListBox 時呼叫。

protected:
 virtual void OnSelected(System::Windows::RoutedEventArgs ^ e);
protected virtual void OnSelected (System.Windows.RoutedEventArgs e);
abstract member OnSelected : System.Windows.RoutedEventArgs -> unit
override this.OnSelected : System.Windows.RoutedEventArgs -> unit
Protected Overridable Sub OnSelected (e As RoutedEventArgs)

參數

e
RoutedEventArgs

事件資料。

備註

當 屬性變更為 true 時, IsSelected 會呼叫這個方法。

適用於