Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在旧项目之前将新项目插入WPF列表框_C#_Wpf_Listbox - Fatal编程技术网

C# 在旧项目之前将新项目插入WPF列表框

C# 在旧项目之前将新项目插入WPF列表框,c#,wpf,listbox,C#,Wpf,Listbox,如何在旧项目之前将新项目插入WPF列表框 像旧文本一样然后我添加 new text old text 反而 old text new text 类似这样的内容?请参阅:Listbox是数据绑定的,还是要以编程方式创建ListBoxItem? ListBox.Items.Insert(0, "Message");

如何在旧项目之前将新项目插入WPF列表框

旧文本一样
然后我添加

new text 

old text
反而

old text 

new text

类似这样的内容?

请参阅:Listbox是数据绑定的,还是要以编程方式创建ListBoxItem?
ListBox.Items.Insert(0, "Message");