消したかったんですよ。
以前にAvalonia UIでウィンドウのタイトルバーを消す記事を書きました。
そしてこうも書きました。
UIフレームワークも最新バージョン使うようにしような!
します。
なんやて!?
ExtendClientAreaChromeHintsがないというエラーが起きてしまいました。
修正は結局1行
もったいぶる必要ありませんね、結果を先に書きましょう。
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="AvaloniaHideTitleBarSample.MainWindow"
ExtendClientAreaToDecorationsHint="True"
- ExtendClientAreaChromeHints="NoChrome"
+ WindowDecorations="BorderOnly"
CanMaximize="False"
CanMinimize="False"
Title="AvaloniaHideTitleBarSample">
Welcome to Avalonia!
</Window>
出来上がりは以前と変わりないため画像は使いまわしてます。
コード全文は以下のリポジトリ…の、12.0.4ブランチ。
何が起きたか?
メジャーバージョンアップによる破壊的変更です。
The Window.ExtendClientAreaChromeHints property consisted of several flags that were not always behaving as expected. This property has been removed, as the WindowDecorations property in conjunction with ExtendClientAreaToDecorationsHint should be used instead.
ExtendClientAreaChromeHintsは削除したので代わりにWindowDecorationsをExtendClientAreaToDecorationsHintと一緒に使えとのことです。
ExtendClientAreaToDecorationsHintは元から使っていたので、WindowDecorationsだけの変更となりました。
せっかくなので他のWindowDecorations
WindowDecorations="Full"
WindowDecorations="Full"だといつもの普通のウィンドウですね。
ExtendClientAreaToDecorationsHint="True"の影響でコンテンツがタイトルまで侵入していて見た目がキモいですが、その程度です。
ちなみに、右から4番目の斜め矢印ボタンは、最大化してタイトルバーを取っ払うフルスクリーン機能のようです。
WindowDecorations="None"
WindowDecorations="None"は枠ごと消えます。
以前のSystemDecorations="None"と同じ結果なので、画像は使いまわしています。
環境
- Visual Studio 2026 Community Version: 18.7.0
- Avalonia UI 12.0.4
- Windows 11
おわりに
UIフレームワークの最新バージョン使うときは気を付けような!





