WPF使用WindowChrome实现自定义标题框功能

代码:

<Window x:Class="WpfDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        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"
        xmlns:shell="clr-namespace:System.Windows.Shell;assembly=PresentationFramework"
        xmlns:local="clr-namespace:WpfDemo"
        mc:Ignorable="d" AllowsTransparency="True" WindowStyle="None"
        Title="MainWindow" Height="350" Width="525">
    <shell:WindowChrome.WindowChrome>
        <shell:WindowChrome ResizeBorderThickness="10" 
            CaptionHeight="40"
            CornerRadius="10"
            GlassFrameThickness="0"/>
    shell:WindowChrome.WindowChrome>
    <Grid>
        <Border Background="Gray"/>
        <Border Height="40" Background="Orange" VerticalAlignment="Top">
            <TextBlock Text="Caption" VerticalAlignment="Bottom"/>
        Border>
    Grid>
Window>

 

WPF中Ribbon控件的使用 - Yang-Fei - 博客园
http://www.cnblogs.com/yang-fei/p/6021300.html

WPF 创建自定义窗体 - Yang-Fei - 博客园

http://www.cnblogs.com/yang-fei/p/4737308.html

Ribbon For WPF的使用 - Arthars - 博客园
http://www.cnblogs.com/Angle-Louis/archive/2012/12/11/2805738.html

转载于:https://www.cnblogs.com/wzwyc/p/7641596.html

你可能感兴趣的:(WPF使用WindowChrome实现自定义标题框功能)