if in vb.net, I can call like this form2.show (), but how in wpf vb.net?
如果在vb.net中,我可以调用这样的form2.show(),但是如何在wpf vb.net中?
thank you
2 个解决方案
#1
0
Did you try the Object Oriented method:
您是否尝试过面向对象的方法:
Dim f2 as New Form2
f2.Show()
it worked for me.
它对我有用。
#2
0
Here in Wpf we cannot open/show the other form directly. so in Wpf we have to create an object that refer to the form2. because in Wpf even our form is considered as class.
在Wpf中,我们无法直接打开/显示其他表单。所以在Wpf中我们必须创建一个引用form2的对象。因为在Wpf甚至我们的形式被认为是阶级。
Dim objForm2 As New Form2
objForm2.Show()
#1
0
Did you try the Object Oriented method:
您是否尝试过面向对象的方法:
Dim f2 as New Form2
f2.Show()
it worked for me.
它对我有用。
#2
0
Here in Wpf we cannot open/show the other form directly. so in Wpf we have to create an object that refer to the form2. because in Wpf even our form is considered as class.
在Wpf中,我们无法直接打开/显示其他表单。所以在Wpf中我们必须创建一个引用form2的对象。因为在Wpf甚至我们的形式被认为是阶级。
Dim objForm2 As New Form2
objForm2.Show()