如何在项目中引用xaml文件? [英] How to I reference an xaml file in my project?

查看:187
本文介绍了如何在项目中引用xaml文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个游戏,我正在整合到我的项目中,我需要知道在我的表单上引用它的人。这是代码:



Private Sub Label27_Click(sender As System.Object,e As System.EventArgs)处理lblWasteEm.Click

FormWasteEm 。显示()

结束子



错误对非共享成员的引用需要对象引用。

I have a game that I am integrating into my project and I need to know who to reference it on my form. Here is the code:

Private Sub Label27_Click(sender As System.Object, e As System.EventArgs) Handles lblWasteEm.Click
FormWasteEm.Show()
End Sub

Error Reference to a non-shared member requires an object reference.

推荐答案

您在类上调用Show,但它不是共享函数。因此,您首先需要实例化一个FormWasteEm对象,然后在此实例上调用Show。



HTH,

Gaston
You are calling Show on the class, but it is not a shared function. So you first need to instantiate a FormWasteEm object and then call Show on this instance.

HTH,
Gaston


这篇关于如何在项目中引用xaml文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆