回答編集履歴

1

サンプルコードと実行結果のスクリーンショットを追加

2017/09/06 13:21

投稿

kfukuda
kfukuda

スコア12

test CHANGED
@@ -5,3 +5,75 @@
5
5
  やりたいことが実現できるかもしれません。
6
6
 
7
7
  <Entry Margin="0,-10,0,-10" />
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+ 追記
16
+
17
+ お役に立てず、申し訳ありません。
18
+
19
+ 私が似たような問題に直面したときは、
20
+
21
+ Entry自身の高さを縮めることができなかったため、
22
+
23
+ 以下のようにマイナスのMarginで対応したことがありました。
24
+
25
+ (下記サンプルコードでは、gridとstacklayoutのspacingを0にするのが先決ですが。)
26
+
27
+
28
+
29
+ 何かのご参考になればと思います。
30
+
31
+
32
+
33
+ ```xaml
34
+
35
+ <?xml version="1.0" encoding="utf-8"?>
36
+
37
+ <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:vm="clr-namespace:Sample;" x:Class="Sample.LoginPage" Title="AppName">
38
+
39
+ <Grid>
40
+
41
+ <Grid.ColumnDefinitions>
42
+
43
+ <ColumnDefinition Width="*" />
44
+
45
+ <ColumnDefinition Width="*" />
46
+
47
+ </Grid.ColumnDefinitions>
48
+
49
+ <StackLayout Grid.Column="0">
50
+
51
+ <Entry Text="hoge1" BackgroundColor="LightGray" />
52
+
53
+ <Entry Text="hoge2" BackgroundColor="LightGray" />
54
+
55
+ <Entry Text="hoge3" BackgroundColor="LightGray" />
56
+
57
+ </StackLayout>
58
+
59
+ <StackLayout Grid.Column="1">
60
+
61
+ <Entry Text="fuga1" BackgroundColor="LightBlue" Margin="0,-5,0,-5" />
62
+
63
+ <Entry Text="fuga2" BackgroundColor="LightBlue" Margin="0,-5,0,-5" />
64
+
65
+ <Entry Text="fuga3" BackgroundColor="LightBlue" Margin="0,-5,0,-5" />
66
+
67
+ </StackLayout>
68
+
69
+ </Grid>
70
+
71
+ </ContentPage>
72
+
73
+ ```
74
+
75
+
76
+
77
+ ![Android](4cb61e98f1fc5b1bda484ca6f270e2ce.png)
78
+
79
+ ![iOS](b2c7f57a38e03e0d0d99d8ee638a4967.png)