WPF中的Openargs? [英] Openargs in WPF?

查看:84
本文介绍了WPF中的Openargs?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个愚蠢的问题,但是请让我明白.

在VBA(Microsoft Access)中,类似"openargs"的东西可以将参数从一种形式传递到另一种形式.新打开的表单可以使用诸如...
这样的打开的args.

This may be a stupid question, but please clear me up.

In VBA (Microsoft Access), there is something like "openargs" which can pass arguments from one form to another form. The newly opened form can make use of that open args like...

Dim abc 
abc = me.openargs
''do something with abc
...



现在,我要移到VS2008,在VB.NET环境中构建WPF应用程序.我只是想知道是否有任何类似的功能?



Now I''m moving to VS2008 building WPF application in VB.NET environment. I was just wondering if there are any similar functionalities? How?

推荐答案

您可以定义带有参数的表单对象的属性或构造函数.区别在于WPF基于.NET,并且更干净(VBA是一种垃圾).您不能传递随机参数,不能创建定义的属性或构造函数,而必须精确传递所需的内容.

您也许应该买一本有关面向对象编程的基础书.
You can define properties or constructors of your form objects which take parameters. The difference is that WPF is based on .NET, and it''s a lot cleaner (VBA is kind of rubbish). You can''t pass random arguments, you create defined properties or constructors and have to pass exactly what is required.

You should perhaps buy a basic book on Object Oriented programming.


这篇关于WPF中的Openargs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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