是的,我相信你將不得不用你自己的界面替換窗口。您可以從透明窗口開始,並在網格周圍留下一些邊距。然後將大拇指,標題欄等放在網格上以模擬窗口行爲。網格邊緣將允許您在「窗口」之外繪製控件。
<Window
x:Class="TransparentFormDemo.Window2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window2" Height="300" Width="300"
AllowsTransparency="True"
WindowStyle="None" Background="Transparent">
<Grid Margin="20" Background="AliceBlue">
<Thumb Name="topThumb" Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Top"
DragDelta="topThumb_DragDelta" Cursor="SizeNS"/>
<!--Thumbs continued-->
<Polygon Points="10,110 60,10 110,110" Fill="Blue" Margin="0,-30"/>
</Grid>
</Window>
堅果,我希望保留/尊重窗口鉻無論操作系統版本,但沒有辦法做到這一點使用該方法。 – 2009-05-01 10:29:17