Wix工具集中的无边界窗口
答
是的。这是可能的。看看这个。
<Window x:Class="WpfApplication1.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:local="clr-namespace:WpfApplication1"
mc:Ignorable="d"
Height="350" Width="525" WindowStyle="None" ResizeMode="NoResize" >
<Grid >
<Rectangle Fill="Gray" MouseDown="Rectangle_MouseDown" />
<Grid Margin="10" Background="LightGray">
---your window elements go here---
</Grid>
</Grid>
里面的矩形元素鼠标按下事件处理程序进入你的代码拖动窗口。因此,如果您单击矩形区域(即内部网格周围的区域),则可以拖动窗口。
private void Rectangle_MouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left)
this.DragMove();
}
我决定切换到Wix#为了获得更多的控制权,但感谢你的答案,希望它有助于某人:) – Mihai
这不是一个WPF应用程序。问题说WIX安装程序。 –