Visual Studio 2008中的Blend 3(wpf)项目 [英] Blend 3(wpf ) project in Visual studio 2008

查看:92
本文介绍了Visual Studio 2008中的Blend 3(wpf)项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由表达式blend 3(wpf)创建的项目,想将此项目添加到
C#win_app_form项目(我的分层项目),但是当我给出它的实例(wpf项目)时,会发生错误.
我应该怎么办 ?通常,我们可以在Visual Studio中使用wpf(blend 3)项目作为参考吗?!
在我的获胜表格中,我有一个像这样的按钮

private void button1_Click(object sender, EventArgs e)
        {
            wpfapp.App wpfinstance = new wpfapp.App(); //is it true?
             wpfinstance.     //what should i write here , it has only InitializeComponent property that gives error .

        }



如何在我的win_form(Visual Studio)中实例化新的wpf_window并显示它?!:confused:

请告诉我我该怎么做,我是初学者! :sigh:

解决方案

您可以尝试告诉我们错误是什么.这是Winforms应用程序吗?我相信有一个可以在Winforms应用程序中托管WPF的控件.

不知道当您1投票给我时,为什么我应该为您提供帮助,但是,不,我认为不是.我认为您需要创建一个Winforms表单,并在其中托管WPF控件.无论哪种方式,您都试图在实例化该应用程序,而不是在其中实例化窗口,这肯定是行不通的.


AFAIK,Expression blend仅适用于WPF和Silverlight. /blockquote>

I have a project that created by expression blend 3 (wpf) and wanna add this projetc to a
C# win_app_form project (my strat up project ),but when I give an instance of it (wpf project ) ,error occurs.
what should I do ? in generally can we use a wpf(blend 3) project in visual studio as a reference?!
In my win form I have a button for example like this

private void button1_Click(object sender, EventArgs e)
        {
            wpfapp.App wpfinstance = new wpfapp.App(); //is it true?
             wpfinstance.     //what should i write here , it has only InitializeComponent property that gives error .

        }



how can I instance new wpf_window in my win_form(visual studio) and show it??!:confused:

Please tell me exactly what I must do,I;m a beginner !! :sigh:

解决方案

You could try telling us what the error is. Is this a winforms app ? I believe there''s a control that can host WPF in a winforms app.

Not sure why I should help you when you 1 voted me, but, no, I don;t think it is. I think you need to create a winforms form, and host WPF controls in it. Either way, you seen to be trying to instantiate the app, not a window in it, which surely won''t work.


AFAIK, Expression blend only works for WPF and Silverlight.


这篇关于Visual Studio 2008中的Blend 3(wpf)项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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