FocusManager.IsFocusScope 附加屬性

定義

判斷附加這個屬性的項目是否為焦點範圍。

see GetIsFocusScope, and SetIsFocusScope
see GetIsFocusScope, and SetIsFocusScope
see GetIsFocusScope, and SetIsFocusScope

範例

下列範例會建立 StackPanel 焦點範圍。

<StackPanel Name="focusScope1" 
            FocusManager.IsFocusScope="True"
            Height="200" Width="200">
  <Button Name="button1" Height="50" Width="50"/>
  <Button Name="button2" Height="50" Width="50"/>
</StackPanel>

備註

焦點範圍是可追蹤其範圍內 之的 FocusManager.FocusedElement 容器專案。 根據預設,類別 Window 是焦點範圍,如同 MenuContextMenuToolBar 類別。 焦點範圍的項目已 IsFocusScope 設定為 true

如需焦點、鍵盤焦點和邏輯焦點的詳細資訊,請參閱 輸入概觀

相依性屬性資訊

標識元欄位 IsFocusScopeProperty
設定為的元數據屬性 true

適用於