回答編集履歴
1
1
answer
CHANGED
@@ -1,4 +1,53 @@
|
|
1
1
|
標準のタイトルバーやウィンドウ枠などは全て外した状態で、
|
2
2
|
それっぽく見えるようにタイトルバーのようなものや閉じるボタンなどを自分でXAMLで配置するしかないかと思います。
|
3
3
|
|
4
|
-
ちなみにご存知かもしれませんが、添付されている画像はWindows XPの標準テーマ(ビジュアルスタイル)です。
|
4
|
+
ちなみにご存知かもしれませんが、添付されている画像はWindows XPの標準テーマ(ビジュアルスタイル)です。
|
5
|
+
|
6
|
+
-----
|
7
|
+
ボタンはpresentationframework.Classicを参照に入れてリソースを適用させてやればよさそうです。
|
8
|
+
(プロパティから「ローカルにコピー」をTrueにしないと実行時にエラーが出るぽい?)
|
9
|
+
|
10
|
+
背景`{DynamicResource {x:Static SystemColors.ControlBrushKey}}`で良いと思います。
|
11
|
+
フォントは`FontFamily="MS UI Gothic" FontSize="12"`辺りかなと思います。
|
12
|
+
|
13
|
+
あとは適用に足してもらえればそれっぽい見た目になると思います。
|
14
|
+
|
15
|
+
```xaml
|
16
|
+
<Window x:Class="WpfApp1.MainWindow"
|
17
|
+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
18
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
19
|
+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
20
|
+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
21
|
+
xmlns:local="clr-namespace:WpfApp1"
|
22
|
+
mc:Ignorable="d"
|
23
|
+
Title="MainWindow"
|
24
|
+
WindowStyle="None"
|
25
|
+
SizeToContent="WidthAndHeight"
|
26
|
+
FontFamily="MS UI Gothic" FontSize="12"
|
27
|
+
>
|
28
|
+
<Window.Resources>
|
29
|
+
|
30
|
+
</Window.Resources>
|
31
|
+
<DockPanel>
|
32
|
+
<Grid Background="Blue" Height="26" DockPanel.Dock="Top">
|
33
|
+
|
34
|
+
</Grid>
|
35
|
+
<Grid Background="Blue">
|
36
|
+
<Grid Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Margin="4,0,4,4">
|
37
|
+
<StackPanel Margin="8">
|
38
|
+
<TextBlock Text="あああああああああああいいいいいいいいいいいいいいううううううううううう" />
|
39
|
+
<Button Content="OK" Width="100" Height="22" HorizontalAlignment="Center" Margin="0,15,0,0">
|
40
|
+
<Button.Resources>
|
41
|
+
<ResourceDictionary Source="/presentationframework.Classic;component/themes/classic.xaml" />
|
42
|
+
</Button.Resources>
|
43
|
+
</Button>
|
44
|
+
</StackPanel>
|
45
|
+
</Grid>
|
46
|
+
|
47
|
+
</Grid>
|
48
|
+
</DockPanel>
|
49
|
+
</Window>
|
50
|
+
|
51
|
+
```
|
52
|
+
|
53
|
+

|