2012-05-04 82 views
0

我想創建一個WPF窗口,除了具有透明背景的單個TextBlock控件外,其實並沒有任何出現。最後的結果是這樣的:WPF中的TextBlock-only窗口

WPF Popup TextBlock

如何創建這樣的「鬼」窗口?

回答

0

嘗試以下操作:

<Window x:Class="MainWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="MainWindow" Height="50" Width="200" AllowsTransparency="True" WindowStyle="None" Background="Transparent"> 
    <TextBlock x:Name="TextClock" FontSize..... etc....> 
    </TextBlock> 
</Window>