質問編集履歴
3
モジュール構成と質問の意図が伝わりづらかったので修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,11 +1,16 @@
|
|
1
|
-
|
1
|
+
# 開発環境
|
2
2
|
- VS2017
|
3
3
|
- .net framework 4.7.1
|
4
4
|
- c#
|
5
5
|
|
6
|
+
# モジュール構成
|
7
|
+
AeroTest.exe - MainWindow.xamlを実装したモジュール
|
6
|
-
ResourceDictionaryで
|
8
|
+
Resources.dll - ResourceDictionaryでstyleを定義したDLL
|
7
|
-
なにか設定が間違っているのでしょうか。
|
8
9
|
|
10
|
+
Resources.dll内で別途スタイルを定義してAeroテーマをボタンなどのデフォルトテーマにしたく指定しているのですが反映されません。
|
11
|
+
Resources.dll内でAeroテーマをResourceDictionary.MergedDictionariesで追加しても反映されない仕様なのでしょうか。
|
12
|
+
ちなみにApp.xaml内で直接AeroテーマをMergedDictionariesに追加する分にはうまくいきます。
|
13
|
+
|
9
14
|
アセンブリ名:Resources
|
10
15
|
ソース名:styles.xaml
|
11
16
|
```c#
|
2
ソース名の明記。アセンブリ名の明記。App.xamlの参照先アセンブリ名が誤っていたので修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,7 +6,8 @@
|
|
6
6
|
ResourceDictionaryで別途スタイルを定義してAeroテーマをボタンなどのデフォルトテーマにしたく指定しているのですが反映されません。
|
7
7
|
なにか設定が間違っているのでしょうか。
|
8
8
|
|
9
|
-
|
9
|
+
アセンブリ名:Resources
|
10
|
+
ソース名:styles.xaml
|
10
11
|
```c#
|
11
12
|
<ResourceDictionary
|
12
13
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
@@ -26,7 +27,8 @@
|
|
26
27
|
</ResourceDictionary>
|
27
28
|
```
|
28
29
|
|
30
|
+
アセンブリ名:AeroTest
|
29
|
-
App.xaml
|
31
|
+
ソース名:App.xaml
|
30
32
|
```c#
|
31
33
|
<Application x:Class="AeroTest.App"
|
32
34
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
@@ -36,14 +38,15 @@
|
|
36
38
|
<Application.Resources>
|
37
39
|
<ResourceDictionary>
|
38
40
|
<ResourceDictionary.MergedDictionaries>
|
39
|
-
<ResourceDictionary Source="pack://application:,,,/
|
41
|
+
<ResourceDictionary Source="pack://application:,,,/Resources;component/styles.xaml"/>
|
40
42
|
</ResourceDictionary.MergedDictionaries>
|
41
43
|
</ResourceDictionary>
|
42
44
|
</Application.Resources>
|
43
45
|
</Application>
|
44
46
|
```
|
45
47
|
|
48
|
+
アセンブリ名:AeroTest
|
46
|
-
MainWindow.xaml
|
49
|
+
ソース名:MainWindow.xaml
|
47
50
|
```c#
|
48
51
|
<Window x:Class="AeroTest.MainWindow"
|
49
52
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
1
カスタムコントールではなく、ResourceDictionaryが正しいので修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
ResourceDictionaryWPFでのAeroテーマをデフォルトスタイルにしたい
|
body
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
- .net framework 4.7.1
|
4
4
|
- c#
|
5
5
|
|
6
|
-
|
6
|
+
ResourceDictionaryで別途スタイルを定義してAeroテーマをボタンなどのデフォルトテーマにしたく指定しているのですが反映されません。
|
7
7
|
なにか設定が間違っているのでしょうか。
|
8
8
|
|
9
|
-
|
9
|
+
ResourceDictionary
|
10
10
|
```c#
|
11
11
|
<ResourceDictionary
|
12
12
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|