通过将MAC和iPhone连接到同一网络(Wifi),我们可以通过MAC中的Safari检查iPhone中的网页吗?我可以通过USB线连接进行检查.但是它会比wifi更方便,因为我可以从通过VNC连接到MAC的Windows机器远程调试.
<ListView
ItemsSource="{Binding Messages}"
Grid.ColumnSpan="2"
HeightRequest="100">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<StackLayout>
<Label
Text="{Binding When}"
XAlign="Center"/>
<StackLayout
BackgroundColor="Gray"
Orientation="Vertical"
VerticalOptions="Center">
<Label
Text="{Binding Message}"
XAlign="Start"/>
<Label
Text="{Binding Sender}"
XAlign="Start"
TextColor="Red"/>
</StackLayout>
</StackLayout>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Run Code Online (Sandbox Code Playgroud)
我在Xamarin.Forms应用程序中呈现自定义ListView.在StackLayout其中包含两个LabelS(到"消息"和"发件人"已绑定),目前只显示一个孩子.使用上面的代码,它只显示"消息".如果我改变代码
<StackLayout
BackgroundColor="Gray"
Orientation="Vertical"
VerticalOptions="Center">
<Label
Text="{Binding Sender}"
XAlign="Start"
TextColor="Red"/>
<Label
Text="{Binding Message}"
XAlign="Start"/>
</StackLayout>
Run Code Online (Sandbox Code Playgroud)
它只显示发件人.简而言之,它只显示第一个孩子.我在这做错了什么?