本文整理汇总了C#中ListView.EndRefresh方法的典型用法代码示例。如果您正苦于以下问题:C# ListView.EndRefresh方法的具体用法?C# ListView.EndRefresh怎么用?C# ListView.EndRefresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListView
的用法示例。
在下文中一共展示了ListView.EndRefresh方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: generatePopularPage
private View generatePopularPage()
{
currentPage = "Popular";
modClubList(popularClubs, clubMemberList);
listView = new ListView
{
ItemsSource = frontClubList,
ItemTemplate = new DataTemplate(typeof(ClubSearchViewCell)),
HorizontalOptions = LayoutOptions.FillAndExpand,
RowHeight = 160,
VerticalOptions = LayoutOptions.FillAndExpand,
BackgroundColor = ch.fromStringToColor("white"),
IsPullToRefreshEnabled = true,
SeparatorColor = ch.fromStringToColor("gray")
};
listView.ItemSelected += ListView_ItemSelected;
listView.RefreshCommand = new Command(() =>
{
updateData();
modClubList(popularClubs, clubMemberList);
listView.EndRefresh();
});
// listView.Refreshing += popularListViewRefresh;
Button bCreateClub = new Button
{
Text = "+",
TextColor = Color.White,
FontAttributes = FontAttributes.Bold,
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Button)),
BorderRadius = 0,
BackgroundColor = ch.fromStringToColor("purple"),
// HeightRequest = 60,
WidthRequest = 60,
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.Center
};
bCreateClub.Clicked += BCreateClub_Clicked;
Button bPopularPage = new Button
{
Text = "Popular",
TextColor = Color.White,
BackgroundColor = ch.fromStringToColor("purplePressed"),
HorizontalOptions = LayoutOptions.FillAndExpand,
BorderRadius = 0,
VerticalOptions = LayoutOptions.Center
};
bPopularPage.Clicked += BPopularPage_Clicked;
Button bNewClubPage = new Button
{
Text = "New",
TextColor = Color.White,
BackgroundColor = ch.fromStringToColor("purple"),
BorderRadius = 0,
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.Center
};
bNewClubPage.Clicked += BNewClubPage_Clicked;
Button bSearchClubsPage = new Button
{
Text = "Search",
TextColor = Color.White,
BackgroundColor = ch.fromStringToColor("purple"),
BorderRadius = 0,
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.Center
};
bSearchClubsPage.Clicked += BSearchClubsPage_Clicked;
StackLayout bottomButtonLayout = new StackLayout
{
Children =
{
bPopularPage,
bNewClubPage,
bSearchClubsPage,
bCreateClub
},
Orientation = StackOrientation.Horizontal,
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.End,
BackgroundColor = ch.fromStringToColor("gray"),
Spacing = 1
};
return new StackLayout
{
Children = {
listView,
bottomButtonLayout
}
};
//.........这里部分代码省略.........
示例2: SalesReportPage
public SalesReportPage()
{
InitializeComponent ();
ListView checkView = new ListView();
User user = App.user;
ListView categoryView = new ListView();
Label mainLabel = new Label ();
mainLabel.Text = "Отчет продаж";
mainLabel.HorizontalOptions = LayoutOptions.Center;
mainLabel.TextColor = Color.FromHex ("FFFFFF");
var menuCheck = new Image ();
menuCheck.Source = "menuCheck.png";
var menuUser = new Image ();
menuUser.Source = "menuUser.png";
var sellsLabel = new Label{ TextColor = Color.FromHex("838282"), FontSize = 10, Text = "общая касса", HorizontalOptions = LayoutOptions.EndAndExpand };
var checkLabel = new Label{ TextColor = Color.FromHex("838282"), FontSize = 10, Text = "средний чек", HorizontalOptions = LayoutOptions.EndAndExpand };
var guestLabel = new Label{ TextColor = Color.FromHex("838282"), FontSize = 10, Text = "посетители", HorizontalOptions = LayoutOptions.EndAndExpand };
var timeLabel = new Label{ TextColor = Color.FromHex("838282"), FontSize = 10, Text = "время смены", HorizontalOptions = LayoutOptions.EndAndExpand };
var sellsCountLabel = new Label{ TextColor = Color.White, Text = "0.00", HorizontalOptions = LayoutOptions.Start };
var checkCountLabel = new Label{ TextColor = Color.White, Text = "0", HorizontalOptions = LayoutOptions.Start };
var guestCountLabel = new Label{ TextColor = Color.White, Text = "0", HorizontalOptions = LayoutOptions.Start };
var timeCountLabel = new Label{ TextColor = Color.White, Text = "00:00" , HorizontalOptions = LayoutOptions.Start};
Label middleCheck = new Label ();
middleCheck.Text = "Средний чек: 0 грн";
middleCheck.TextColor = Color.FromHex ("FFFFFF");
Label totalGuests = new Label ();
totalGuests.TextColor = Color.FromHex ("FFFFFF");
totalGuests.Text = "Количество гостей: 0 Человек";
Api api = new Api ();
Series lineSeries = new Series
{
Color = Color.FromHex("FFC944"),
Type = ChartType.Line
};
lineSeries.Points.Add(new DataPoint() { Label = "Jan1", Value = 0 });
lineSeries.Points.Add(new DataPoint() { Label = "Jan2", Value = 5 });
lineSeries.Points.Add(new DataPoint() { Label = "Jan3", Value = 1 });
lineSeries.Points.Add(new DataPoint() { Label = "Jan4", Value = 0 });
lineSeries.Points.Add(new DataPoint() { Label = "March", Value = 0 });
Chart reportChart = new Chart {
//Color = Color.White,
WidthRequest = 321,
HeightRequest = 247,
Spacing = 10,
Grid = true,
BackgroundColor = Color.FromHex("666666"),
Color = Color.FromHex("777"),
};
reportChart.Series.Add (lineSeries);
DatePicker dateStartPicker = new DatePicker
{
Format = "d MMMM yyyy",
VerticalOptions = LayoutOptions.CenterAndExpand,
BackgroundColor = Color.FromHex("666666"),
};
DatePicker dateEndPicker = new DatePicker
{
Format = "d MMMM yyyy",
BackgroundColor = Color.FromHex("666666"),
VerticalOptions = LayoutOptions.CenterAndExpand
};
categoryView.BeginRefresh ();
categoryView.ItemTemplate = new DataTemplate (typeof(CategoryReportCell));
if (user != null) {
var categories = api.getCategories (user);
categoryView.ItemsSource = categories;
}
categoryView.EndRefresh ();
checkView.ItemsSource = new string[]{
"Чеков без оплаты 0 >",
"Чеков со скидкой 0 >"
};
var line = new BoxView{
Color = Color.FromHex("838282"),
WidthRequest = 100,
HeightRequest = 1
};
this.Padding = new Thickness (0, Device.OnPlatform (0, 0, 0), 0, 5);
var headerLayout = new StackLayout{
Children = {
mainLabel,
reportChart,
new StackLayout{
Padding = new Thickness(10,0,10,0),
Spacing = 5,
Orientation = StackOrientation.Horizontal,
Children = {
menuCheck,
checkCountLabel,
checkLabel
//.........这里部分代码省略.........
示例3: RefreshAsync
private async Task RefreshAsync(ListView list)
{
await DonkyCore.Instance.NotificationController.SynchroniseAsync();
await ViewModel.RefreshAsync();
list.EndRefresh();
}
示例4: CategoryListEditPage
public CategoryListEditPage()
{
NavigationPage.SetHasNavigationBar (this, false);
App.MasterDetailPage.IsPresented = false;
InitializeComponent ();
var user = App.user;
var categoryView = new ListView();
var api = new Api ();
categoryView.SeparatorColor = Color.FromHex ("E6E2DB");
categoryView.BeginRefresh ();
categoryView.ItemTemplate = new DataTemplate (typeof(CategoryEditCell));
if (user != null) {
var categories = api.getCategories (user);
categoryView.ItemsSource = categories;
}
categoryView.ItemTapped += (sender, e) => {
categoryView.SelectedItem = null;
App.MasterDetailPage.Detail = new CategoryEditPage(e.Item as Category);
};
categoryView.EndRefresh ();
//this.Padding = new Thickness (10, 30, 10, 5);
// Set the content for the page.
this.Content = new StackLayout {
BackgroundColor = Color.FromHex("E6E2DB"),
Children = {
new StackLayout{
Padding = new Thickness (10, 40, 10, 15),
BackgroundColor = Color.FromHex("525151"),
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand,
Orientation = StackOrientation.Horizontal,
Children = {
new Label {
HorizontalOptions = LayoutOptions.CenterAndExpand,
Text = "Управление товаром",
TextColor = Color.White
}
}
},
new StackLayout{
Padding = new Thickness (0, 40, 0, 0),
BackgroundColor = Color.FromHex("E6E2DB"),
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand,
Children = {
new Label {
HorizontalOptions = LayoutOptions.StartAndExpand,
VerticalOptions = LayoutOptions.End,
Text = "Категории",
TextColor = Color.FromHex("666")
},
categoryView
}
}
},
};
}