WPF中可调整大小的自定义窗口

时间:2011-01-06 23:26:07

标签: c# wpf

我需要使用WindowStyle.None,AllowTransparency = true等制作自定义窗口。

和“可调整大小

如何帮助我创建可调整大小的这个?

...坦

1 个答案:

答案 0 :(得分:4)

最简单的解决方案是实现ResizeMode属性,将其设置为“CanResizeWithGrip”。

<Window x:Class="TestProject.ScratchWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
        Opacity="1.0" 

        ResizeMode="CanResizeWithGrip"

        WindowStyle="None" 
        AllowsTransparency="True"
        Title="Test Window">

    <!-- Window Contents Here -->
</Window>
相关问题