我是xamarin.forms的新手.请帮我解释如何在Stack Layout或Frame中添加click事件
<Frame Grid.Column="0" BackgroundColor="#ffffff" Grid.Row="0" HasShadow="true" OutlineColor = "Black">
</Frame>
<StackLayout Grid.Column="0" BackgroundColor="#313FA0" Grid.Row="0">
</StackLayout>
Run Code Online (Sandbox Code Playgroud) 在给出edittext字段中输入的时候,如果有人将IP地址的IP地址格式放入应该像这些000.000.0.000 plz帮助我那么显示错误
在HTML5中: -
<div data-role="content">
<form id="form">
<div data-role="fieldcontain">
<label for="ip">IP Address/System Name</label>
<input name="ip" id="ip" type="text" pattern="((^|\.)((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]?\d))){4}$">
</div>
<div style="text-align:center;">
<div data-role="button" data-theme="b" data-inline="true" id="button1">Update</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud) 如何在ListView中使用数据绑定创建Grid?我正在用Xamarin.Forms创建这个应用程序.
如果我不知道我需要多少行和列,如何在ListView绑定中动态创建Grid?
这是我到目前为止:
<ListView x:Name="List" HasUnevenRows="True">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Grid Padding="10,10,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="200"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"></ColumnDefinition>
</Grid.ColumnDefinitions>
<StackLayout BackgroundColor="#313FA0" Grid.Row="0" Grid.Column="0" HeightRequest="200" WidthRequest="200">
<Label Text="{Binding NUMBER}" FontSize="50" TextColor="White" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"/>
<Label Text="{Binding NAME}" FontSize="30" TextColor="White" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"/>
</StackLayout>
</Grid>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Run Code Online (Sandbox Code Playgroud)
在此代码中,只创建了一行和一列.如果我有多个数据点,我该如何解决这个问题?例如,如果我需要一行有两列.
提前致谢.
我是Xamarin.Forms的新手,我需要加载消息,我可以显示加载消息,请帮助我
码:-
<AbsoluteLayout>
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
AbsoluteLayout.LayoutFlags="All" Padding="30" >
<Grid>
//something
</Grid>
</StackLayout>
<ContentView x:Name="overlay" AbsoluteLayout.LayoutBounds="0, 0, 1, 1" AbsoluteLayout.LayoutFlags="All" IsVisible="False" BackgroundColor="#C0808080" Padding="10, 0">
<ActivityIndicator WidthRequest="110" HeightRequest="70" IsRunning="True" IsVisible="True" Color="Black" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"/>
</ContentView>
</AbsoluteLayout>
Run Code Online (Sandbox Code Playgroud)
Thanx提前
干杯