syncfusion-wpf-chromeless-window

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Implementing Chromeless Window

实现Chromeless Window

This skill explains how to implement and customize the Syncfusion WPF
ChromelessWindow
.
本内容将说明如何实现和自定义Syncfusion WPF
ChromelessWindow

When to Use This Skill

何时使用本技能

  • Use when the user needs a frameless/chromeless WPF window with a customizable title bar.
  • Use when customizing titlebar background, height, font, icon, or alignment.
  • Use when adding controls or custom buttons to the title bar (left/right).
  • Use when changing borders, corner radius, resize behavior, or theme integration.
  • Use when the user needs
    UseNativeChrome
    behavior for window docking.
  • 当用户需要带有可自定义标题栏的无框/无边框WPF窗口时使用。
  • 当需要自定义标题栏背景、高度、字体、图标或对齐方式时使用。
  • 当需要在标题栏(左侧/右侧)添加控件或自定义按钮时使用。
  • 当需要更改边框、圆角、调整大小行为或集成主题时使用。
  • 当用户需要
    UseNativeChrome
    行为以实现窗口停靠时使用。

Navigation Guide

导航指南

Follow the links below to open focused reference pages for each task.
点击以下链接,打开各任务对应的聚焦参考页面。

Getting started

入门指南

📄 Read: references/getting-started.md
  • Add
    ChromelessWindow
    to a project, basic properties and quick examples.
📄 阅读: references/getting-started.md
  • 向项目中添加
    ChromelessWindow
    、基础属性及快速示例。

Overview

概述

📄 Read: references/overview.md
  • High-level features and supported scenarios.
📄 阅读: references/overview.md
  • 高级功能及支持场景介绍。

Title bar customization

标题栏自定义

📄 Read: references/titlebar-customization.md
  • Background, height, font, visibility, maximize/minimize buttons.
📄 阅读: references/titlebar-customization.md
  • 背景、高度、字体、可见性、最大化/最小化按钮设置。

Title bar custom buttons & controls

标题栏自定义按钮与控件

📄 Read: references/titlebar-custom-buttons.md 📄 Read: references/adding-controls.md
  • Add custom buttons or adaptive controls (Left/Right header items).
📄 阅读: references/titlebar-custom-buttons.md 📄 阅读: references/adding-controls.md
  • 添加自定义按钮或自适应控件(左侧/右侧标题栏项)。

Styling & Templates

样式与模板

📄 Read: references/styling.md
  • Templates for TitleBar, TitleButton, overriding default styles.
📄 阅读: references/styling.md
  • TitleBar、TitleButton的模板,以及覆盖默认样式的方法。

Border & Corner Radius

边框与圆角

📄 Read: references/border-customization.md 📄 Read: references/corner-radius.md
  • Resize border color, thickness, corner radius examples.
📄 阅读: references/border-customization.md 📄 阅读: references/corner-radius.md
  • 调整边框颜色、粗细、圆角的示例。

Visual structure & themes

视觉结构与主题

📄 Read: references/visual-structure.md 📄 Read: references/set-visual-styles.md
  • Visual element layout and theme application guidance.
📄 阅读: references/visual-structure.md 📄 阅读: references/set-visual-styles.md
  • 视觉元素布局及主题应用指南。

Native chrome / docking

原生边框/窗口停靠

📄 Read: references/use-native-chrome.md
  • UseNativeChrome
    behavior and notes for docking.
📄 阅读: references/use-native-chrome.md
  • UseNativeChrome
    行为及窗口停靠相关说明。

End-user capabilities

终端用户操作能力

📄 Read: references/end-user-capabilities.md
  • What end users can do (maximize, minimize, restore, resize).
📄 阅读: references/end-user-capabilities.md
  • 终端用户可执行的操作(最大化、最小化、还原、调整大小)。

Quick Start

快速入门

Minimal
ChromelessWindow
example (XAML):
xml
<syncfusion:ChromelessWindow x:Class="Chromelesswindow.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:syncfusion="clr-namespace:Syncfusion.Windows.Shared;assembly=Syncfusion.Shared.WPF"
    Title="ChromelessWindow Sample" Height="350" Width="525"
    TitleBarBackground="#FF2D2D2D" TitleFontSize="14" TitleBarHeight="36">
    <Grid>
        <!-- App content here -->
    </Grid>
</syncfusion:ChromelessWindow>
极简
ChromelessWindow
示例(XAML):
xml
<syncfusion:ChromelessWindow x:Class="Chromelesswindow.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:syncfusion="clr-namespace:Syncfusion.Windows.Shared;assembly=Syncfusion.Shared.WPF"
    Title="ChromelessWindow Sample" Height="350" Width="525"
    TitleBarBackground="#FF2D2D2D" TitleFontSize="14" TitleBarHeight="36">
    <Grid>
        <!-- App content here -->
    </Grid>
</syncfusion:ChromelessWindow>

Common Patterns

常见模式

  • Add custom left/right titlebar items with
    LeftHeaderItemsSource
    /
    RightHeaderItemsSource
    .
  • Use
    TitleBarTemplate
    /
    TitleButtonTemplate
    to fully customize visuals.
  • Override default style in
    App.xaml
    when modifying many template parts.
  • 使用
    LeftHeaderItemsSource
    /
    RightHeaderItemsSource
    添加自定义左侧/右侧标题栏项。
  • 使用
    TitleBarTemplate
    /
    TitleButtonTemplate
    完全自定义视觉效果。
  • 当修改多个模板部分时,在
    App.xaml
    中覆盖默认样式。

Troubleshooting

故障排除

  • If maximize/minimize buttons don't appear, check
    ResizeMode
    and
    ShowMaximizeButton
    /
    ShowMinimizeButton
    .
  • For drag-to-move to work, ensure a
    TitleBar
    named
    PART_TitleBar
    is present in the template.
  • If resizing is hard, increase
    ResizeBorderThickness
    .
  • When custom templates are not applied, verify resources are included in
    App.xaml
    and keys match.
  • 如果最大化/最小化按钮未显示,请检查
    ResizeMode
    以及
    ShowMaximizeButton
    /
    ShowMinimizeButton
    属性。
  • 要使拖动移动功能生效,请确保模板中存在名为
    PART_TitleBar
    TitleBar
  • 如果调整大小困难,请增大
    ResizeBorderThickness
    的值。
  • 如果自定义模板未生效,请验证资源已包含在
    App.xaml
    中且键值匹配。