我正在尝试使用创建一个Windows 10天气应用程序。我需要一个来显示最近 10 天的天气部分。我必须为项目设置模板。我试过这个:WPFC#ListboxListbox
<ListBox Grid.Row="1" x:Name="DailyWeatherListBox">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel>
<!--...-->
</StackPanel>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Run Code Online (Sandbox Code Playgroud)
查看 Windows 10 天气。我将此图像放置在 Windows 10 中以废弃。我也不知道如何设置Scrollbar在Listbox角落。如果您能提供帮助,我将非常感激。
我是从 YouTube 视频中听到的。视频是Brief History of the Future - 245 Years in 11 Minutes. 视频中只说2079年6月6日SQL服务器会出现问题。我对此很感兴趣。我在互联网上搜索了这个,但没有找到任何东西。如果您有任何这方面的信息,请分享
我有 listBox 和这个文本文件: " 1 2 3 4 'blank line' " 我想读取这个没有空行的文件。我试试这个:
using (StreamReader reader = new StreamReader("MyMessages.chat"))
{
var line = reader.ReadToEnd().Split('\n');
for (int i = 0; i < line.Length; i++)
{
if (line[i] != " ")
{
listBox.Items.Add(line[i]);
listBox.Visibility = Visibility.Visible;
}
}
}
Run Code Online (Sandbox Code Playgroud)
但这不起作用