- Add comprehensive ControlGallery sample app with 12 pages demonstrating all 35+ controls - Add detailed ROADMAP.md with version milestones - Add README placeholders for VSIX icons and template images - Sample pages include: Home, Buttons, Labels, Entry, Pickers, Sliders, Toggles, Progress, Images, CollectionView, CarouselView, SwipeView, RefreshView 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
namespace ControlGallery.Pages;
|
|
|
|
public partial class RefreshViewPage : ContentPage
|
|
{
|
|
private readonly Random _random = new();
|
|
private readonly string[] _headlines = new[]
|
|
{
|
|
"OpenMaui 1.0 Released!",
|
|
"Linux Desktop Apps Made Easy",
|
|
"SkiaSharp Powers Modern UIs",
|
|
"Cross-Platform Development Grows",
|
|
".NET 9 Performance Boost",
|
|
"XAML Hot Reload Coming Soon",
|
|
"Wayland Support Expanding",
|
|
"Community Contributions Welcome",
|
|
"New Controls Added Weekly",
|
|
"Accessibility Features Improved"
|
|
};
|
|
|
|
public RefreshViewPage()
|
|
{
|
|
InitializeComponent();
|
|
UpdateNews();
|
|
}
|
|
|
|
private async void OnRefreshing(object sender, EventArgs e)
|
|
{
|
|
// Simulate network delay
|
|
await Task.Delay(1500);
|
|
|
|
UpdateNews();
|
|
LastRefreshLabel.Text = $"Last refreshed: {DateTime.Now:HH:mm:ss}";
|
|
|
|
RefreshContainer.IsRefreshing = false;
|
|
}
|
|
|
|
private void OnManualRefreshClicked(object sender, EventArgs e)
|
|
{
|
|
RefreshContainer.IsRefreshing = true;
|
|
}
|
|
|
|
private void UpdateNews()
|
|
{
|
|
NewsItem1.Text = _headlines[_random.Next(_headlines.Length)];
|
|
NewsItem2.Text = _headlines[_random.Next(_headlines.Length)];
|
|
NewsItem3.Text = _headlines[_random.Next(_headlines.Length)];
|
|
}
|
|
}
|