語言

Window.ExtendsContentIntoTitleBar 屬性

定義

取得或設定一個值,指定視窗預設標題列是否應該隱藏,以騰出空間給應用程式內容。

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

void ExtendsContentIntoTitleBar(bool value);
public bool ExtendsContentIntoTitleBar { get; set; }
var boolean = window.extendsContentIntoTitleBar;
window.extendsContentIntoTitleBar = boolean;
Public Property ExtendsContentIntoTitleBar As Boolean

屬性值

Boolean

bool

true如果預設標題欄應該被隱藏;否則,。 false

備註

結合 SetTitleBar 方法使用此特性,將應用程式視窗的系統標題列替換為自訂內容。 更多資訊和範例請參考 SetTitleBar 。

要指定自訂標題欄,必須設定 ExtendsContentIntoTitleBar 為 以 true 隱藏預設系統標題欄。 若 ExtendsContentIntoTitleBar , false則呼叫 不 SetTitleBar 產生任何影響。 你自訂的標題列元素會在應用程式視窗的主體中以一般 UI 元素的形式顯示,且不會有標題列的行為。

如果你設定 ExtendsContentIntoTitleBar 為但 true 不呼叫 SetTitleBar,會提供一個預設的自訂標題欄。 更多詳情請參見 SetTitleBar 。

謹慎

ExtendsContentIntoTitleBar 會在 Window 的 XAML IntelliSense 顯示,但在 XAML 中設定它會造成錯誤。 請改為在程式碼中設定此屬性。

適用於

另請參閱