質問編集履歴
1
省略部分の入力
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,35 +2,77 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
以下サイトでユーザーコントロールを作った場合で、フォルダの下にユーザーコントロールの作成した場合、そのユーザーコントロールの指定の仕方が分かりません
|
5
|
+
以下サイトでユーザーコントロールを作った場合で、フォルダの下にユーザーコントロールの作成した場合、そのユーザーコントロールの指定の仕方が分かりません。
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
+
コードについてはサイトのままになります。
|
9
10
|
|
11
|
+
サイト:https://qiita.com/soi/items/12ceea4efcf31c1a7b93
|
12
|
+
|
13
|
+
環境:VisualStudio
|
10
14
|
|
11
15
|
|
12
16
|
|
13
17
|
ソリューション
|
14
18
|
|
15
|
-
┗
|
19
|
+
┗TestUserControlSimple
|
16
20
|
|
17
|
-
|
21
|
+
----┣Propertirs
|
18
22
|
|
19
|
-
|
23
|
+
----┣参照
|
20
24
|
|
21
|
-
|
25
|
+
----┣MainWindows.xaml
|
22
26
|
|
27
|
+
----┗UI ←追加。
|
28
|
+
|
23
|
-
|
29
|
+
-------┗SimpleUserControl.xaml
|
24
30
|
|
25
31
|
|
26
32
|
|
33
|
+
```ここに言語を入力
|
27
34
|
|
35
|
+
<!-- SimpleUserControl.xaml -->
|
36
|
+
|
37
|
+
<UserControl
|
38
|
+
|
39
|
+
x:Class="TestUserControlSimple.SimpleUserControl"
|
40
|
+
|
41
|
+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
42
|
+
|
43
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
44
|
+
|
45
|
+
<StackPanel Orientation="Horizontal">
|
46
|
+
|
47
|
+
<Rectangle Width="50" Fill="Red" />
|
48
|
+
|
49
|
+
<TextBlock Text=":" />
|
50
|
+
|
51
|
+
<TextBox Text="HogeHoge" />
|
52
|
+
|
53
|
+
</StackPanel>
|
54
|
+
|
55
|
+
</UserControl>
|
56
|
+
|
57
|
+
```
|
28
58
|
|
29
59
|
|
30
60
|
|
31
61
|
```xaml
|
32
62
|
|
33
|
-
<!--MainWindow.xaml-->
|
63
|
+
<!-- MainWindow.xaml -->
|
64
|
+
|
65
|
+
<Window
|
66
|
+
|
67
|
+
x:Class="TestUserControlSimple.MainWindow"
|
68
|
+
|
69
|
+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
70
|
+
|
71
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
72
|
+
|
73
|
+
xmlns:local="clr-namespace:TestUserControlSimple"
|
74
|
+
|
75
|
+
Width="200" Height="200">
|
34
76
|
|
35
77
|
<StackPanel Margin="10">
|
36
78
|
|
@@ -38,18 +80,10 @@
|
|
38
80
|
|
39
81
|
<local:SimpleUserControl/> ←ここ
|
40
82
|
|
41
|
-
|
83
|
+
<local:SimpleUserControl/>
|
42
84
|
|
43
85
|
</StackPanel>
|
44
86
|
|
45
|
-
<
|
87
|
+
</Window>
|
46
88
|
|
47
89
|
```
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
サイト:https://qiita.com/soi/items/12ceea4efcf31c1a7b93
|
54
|
-
|
55
|
-
環境:VisualStudio
|