#freeze
[[FrontPage]]
ウインドウタイトルをなくすには、こんな記述がいいみたい。
<Window x:Name="w1" x:Class="clock1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" VerticalAlignment="Center" VerticalContentAlignment="Center" Height="231" Width="221" WindowStyle="None">
<Canvas x:Name="canvas1" Width="200" Height="200" MouseLeftButtonDown="canvasleftdown">
:
:
</Canvas>
</Window>
そう、ここね。
WindowStyle="None"
ここを書き換えればいいのね。ちなみに意味はこんな感じ。→ WindowStyle
タイトルバーがない以上、ウインドウの移動をどこかでしなくちゃだけど、それはここでやるの。
<Canvas x:Name="canvas1" Width="200" Height="200"MouseLeftButtonDown="canvasleftdown">
マウス左ボタン押下(MouseLeftButtonDown)の時に、 canvasleftdown を呼べって書いてあるでしょう?で、コードの方は以下ね。
private void canvasleftdown(object sender, MouseButtonEventArgs e)
{
this.DragMove();
}
これで、このウインドウはタイトルバーなしで移動できるわ。