質問編集履歴
6
xaml.csコードを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -166,4 +166,36 @@
|
|
166
166
|
|
167
167
|
```
|
168
168
|
|
169
|
+
【Testプロジェクト】MainPage.xaml.cs
|
170
|
+
|
171
|
+
```
|
172
|
+
|
173
|
+
using Xamarin.Forms;
|
174
|
+
|
175
|
+
using Plugin.Feature1;
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
namespace Test.Views
|
180
|
+
|
181
|
+
{
|
182
|
+
|
183
|
+
public partial class MainPage : ContentPage
|
184
|
+
|
185
|
+
{
|
186
|
+
|
187
|
+
public MainPage ()
|
188
|
+
|
189
|
+
{
|
190
|
+
|
191
|
+
InitializeComponent ();
|
192
|
+
|
193
|
+
}
|
194
|
+
|
195
|
+
}
|
196
|
+
|
197
|
+
}
|
198
|
+
|
199
|
+
```
|
200
|
+
|
169
201
|
よろしくお願い致します。
|
5
クラス名の間違いを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -136,7 +136,7 @@
|
|
136
136
|
|
137
137
|
```
|
138
138
|
|
139
|
-
【Testプロジェクト】Main.xaml
|
139
|
+
【Testプロジェクト】MainPage.xaml
|
140
140
|
|
141
141
|
```
|
142
142
|
|
4
View1クラスの活用クラスを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
以下ソースコードです
|
40
40
|
|
41
|
-
View1.xaml
|
41
|
+
【Feature1プロジェクト】View1.xaml
|
42
42
|
|
43
43
|
```
|
44
44
|
|
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
|
68
68
|
|
69
|
-
View1.xaml.cs
|
69
|
+
【Feature1プロジェクト】View1.xaml.cs
|
70
70
|
|
71
71
|
```
|
72
72
|
|
@@ -114,7 +114,7 @@
|
|
114
114
|
|
115
115
|
|
116
116
|
|
117
|
-
IFeature1.shared.cs
|
117
|
+
【Feature1プロジェクト】IFeature1.shared.cs
|
118
118
|
|
119
119
|
```
|
120
120
|
|
@@ -136,6 +136,34 @@
|
|
136
136
|
|
137
137
|
```
|
138
138
|
|
139
|
+
【Testプロジェクト】Main.xaml
|
140
|
+
|
141
|
+
```
|
142
|
+
|
143
|
+
<?xml version="1.0" encoding="utf-8" ?>
|
144
|
+
|
145
|
+
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
146
|
+
|
147
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
148
|
+
|
149
|
+
xmlns:hoge="clr-namespace:Plugin.Feature1;assembly=Plugin.Feature1"
|
150
|
+
|
151
|
+
x:Class="Test.Views.MainPage"
|
152
|
+
|
153
|
+
Title="{Binding Title}">
|
139
154
|
|
140
155
|
|
156
|
+
|
157
|
+
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
|
158
|
+
|
159
|
+
<hoge:View1/>
|
160
|
+
|
161
|
+
</StackLayout>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</ContentPage>
|
166
|
+
|
167
|
+
```
|
168
|
+
|
141
169
|
よろしくお願い致します。
|
3
コード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -36,4 +36,106 @@
|
|
36
36
|
|
37
37
|
|
38
38
|
|
39
|
+
以下ソースコードです
|
40
|
+
|
41
|
+
View1.xaml
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
46
|
+
|
47
|
+
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
48
|
+
|
49
|
+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
50
|
+
|
51
|
+
x:Class="Plugin.Feature1.View1">
|
52
|
+
|
53
|
+
<ContentView.Content>
|
54
|
+
|
55
|
+
<StackLayout HorizontalOptions="Center" VerticalOptions="Center" BackgroundColor="Black">
|
56
|
+
|
57
|
+
<Label Text="Hello Xamarin.Forms!" TextColor="White"/>
|
58
|
+
|
59
|
+
</StackLayout>
|
60
|
+
|
61
|
+
</ContentView.Content>
|
62
|
+
|
63
|
+
</ContentView>
|
64
|
+
|
65
|
+
```
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
View1.xaml.cs
|
70
|
+
|
71
|
+
```
|
72
|
+
|
73
|
+
using System;
|
74
|
+
|
75
|
+
using System.Collections.Generic;
|
76
|
+
|
77
|
+
using System.Linq;
|
78
|
+
|
79
|
+
using System.Text;
|
80
|
+
|
81
|
+
using System.Threading.Tasks;
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
using Xamarin.Forms;
|
86
|
+
|
87
|
+
using Xamarin.Forms.Xaml;
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
namespace Plugin.Feature1
|
92
|
+
|
93
|
+
{
|
94
|
+
|
95
|
+
[XamlCompilation(XamlCompilationOptions.Compile)]
|
96
|
+
|
97
|
+
public partial class View1 : ContentView
|
98
|
+
|
99
|
+
{
|
100
|
+
|
101
|
+
public View1 ()
|
102
|
+
|
103
|
+
{
|
104
|
+
|
105
|
+
InitializeComponent ();
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
}
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
```
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
IFeature1.shared.cs
|
118
|
+
|
119
|
+
```
|
120
|
+
|
121
|
+
using Xamarin.Forms;
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
namespace Plugin.Feature1
|
126
|
+
|
127
|
+
{
|
128
|
+
|
129
|
+
public interface IFeature1
|
130
|
+
|
131
|
+
{
|
132
|
+
|
133
|
+
}
|
134
|
+
|
135
|
+
}
|
136
|
+
|
137
|
+
```
|
138
|
+
|
139
|
+
|
140
|
+
|
39
141
|
よろしくお願い致します。
|
2
質問内容を箇条書きに
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,9 +30,9 @@
|
|
30
30
|
|
31
31
|
|
32
32
|
|
33
|
-
xamlから作ることは可能でしょうか?
|
33
|
+
- xamlから作ることは可能でしょうか?
|
34
34
|
|
35
|
-
|
35
|
+
- その場合通常プロジェクトで画面を作るときと異なる点はどこになるでしょうか?
|
36
36
|
|
37
37
|
|
38
38
|
|
1
試したことを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,6 +24,12 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
+
xamlを追加し、ルートをcontentViewに変更するなどしてみましたが、
|
28
|
+
|
29
|
+
呼び出した際にエラーこそでないものの、画面に表示されません。
|
30
|
+
|
31
|
+
|
32
|
+
|
27
33
|
xamlから作ることは可能でしょうか?
|
28
34
|
|
29
35
|
また、その場合通常プロジェクトで画面を作るときと異なる点はどこになるでしょうか?
|