C#WPF如何删除对象? [英] C# WPF how do i remove objects?
本文介绍了C#WPF如何删除对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道如何添加对象
I know how to add objects like
ProgressBar PROB = new ProgressBar();
this.grid0.Children.Add(PROB);
但是如何删除对象?
but how do i remove the objects?
推荐答案
您可以像这样使用Remove Operator
You can use Remove Operator like this
ProgressBar PROB = new ProgressBar();
this.Grid0.Children.Add(PROB);
this.Grid0.Children.Remove(PROB);
希望对您有帮助
Hope this helps
这篇关于C#WPF如何删除对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文