0
그래서 저는 Xamarin을 처음 사용하고 저에게 저장 한 약속에 대해 생각 나게하는 App을 작성하고 싶습니다. 이를 위해 앞으로 예정된 약속 목록을 만들었습니다. 그러나 과거에 거짓말을 한 목록에서 자동으로 약속을 제거하는 방법을 모르겠습니다. 관련 XAML 파일은 다음과 같습니다listView에서 불필요한 데이터를 제거하는 방법은 무엇입니까?
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:constants="clr-namespace:XamarinFormsSample;assembly=XamarinFormsXamlSample"
x:Class="My.View.AppointmentCalendarView"
Title="AppointmentCalendarPage">
<ListView x:Name="AppointmentView">
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding AppointmentDate}: {Binding AppointmentType}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentPage>
를 마지막 부분에서
{
public class AppointmentCalendarPage : ContentPage
{
ListView AppointmentView = new ListView();
ObservableCollection<Appointment> appointments = new ObservableCollection<Appointment>();
public AppointmentCalendarPage()
{
AppointmentView.ItemsSource = appointments;
Appointments.Add(new Appointment { ID = 0, Host = 0, AppointmentDate = new DateTime(2016, 12, 24), AppointmentType = "Christmas" });
}
}
}
에 의해 정의 된 목록으로, 예약 클래스의 관련 데이터는 명확해야한다.
MV 또는 M면에서 약속 통과 사례를 처리하려면 어떻게해야합니까?
관찰 가능한 컬렉션에서 제거 할 수 있습니다. –
어떻게하면됩니까? – JLN
https://msdn.microsoft.com/en-us/library/ms654938(v=vs.110).aspx –