参加 AI 挑战

发布: (2025年12月4日 GMT+8 10:09)
1 min read
原文: 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

相关文章

阅读更多 »

被遗忘的 tech 墓地 by kiroween

一次 Hackathon 之旅:走进旧发明的墓园 每年十月,创意世界里总会掀起一阵奇异的波动。今年,Kiroween 发起挑战,……