参加 AI 挑战

发布: (2025年12月4日 GMT+8 10:09)
1 分钟阅读
原文: Dev.to

Source: Dev.to

跨平台应用的 AI 挑战 – WOW 因子提交

XAML (MainPage.xaml)


    
    
        
            
                
                    
                    
                
            
        

C# (MainPage.xaml.cs)

using System.Collections.Generic;
using Uno.UI.Runtime.Skia;
using Microsoft.UI.Xaml.Controls; // Assuming Page is from this namespace

namespace CoffeeShopApp
{
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            var coffeeMenu = new List
            {
                new CoffeeItem { Name = "Espresso", Price = "₹100" },
                new CoffeeItem { Name = "Latte", Price = "₹150" },
                new CoffeeItem { Name = "Cappuccino", Price = "₹150" }
            };

            CoffeeMenu.ItemsSource = coffeeMenu;
        }
    }

    public class CoffeeItem
    {
        public string Name { get; set; }
        public string Price { get; set; }
    }
}
Back to Blog

相关文章

阅读更多 »