【发布时间】:2019-04-30 06:35:52
【问题描述】:
我正在尝试使用C# 在WPF 中创建一个Windows 10 天气应用程序。我需要一个 Listbox 来显示最近 10 天的天气部分。我必须为 Listbox 项设置模板。我试过这个:
<ListBox Grid.Row="1" x:Name="DailyWeatherListBox">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel>
<!--...-->
</StackPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
This is the recent 10 day weather section (Windows 10 Weather)
查看 Windows 10 天气。我将此图像用于废弃 Windows 10。
我也不知道如何在Listbox 角落设置Scrollbar。如果您能提供帮助,我将不胜感激。
【问题讨论】:
标签: c# wpf templates listbox listboxitem