简体   繁体   English

如何在单击父窗口的Silverlight上打开单独的子窗口?

[英]How to open a seperate child window on a click to parent window silverlight?

I am new to c# and i create a project in silverlight-5 and i chose "ASP.NET web application" while selecting the project. 我是C#的新手,我在silverlight-5中创建了一个项目,并且在选择项目时选择了“ ASP.NET Web应用程序”。 which has GUI coding in xml and behind i code in c# to handle the events. 在xml中有GUI编码,在c#中有i编码在后面以处理事件。 The project on running opens Internet explorer and shows the GUI there.(It is to explain you what kind a project i have created, I am not using WPF application, there are lot of samples for WPF but less for silverlight using xml). 运行中的项目将打开Internet Explorer,并在其中显示GUI。(这是为了向您解释我创建了哪种项目,我没有使用WPF应用程序,WPF的示例很多,而使用xml的Silverlight的示例更少)。

I have to create a GUI which will consists of a button intially (suppose "File" ). 我必须创建一个GUI,该GUI最初将包含一个按钮(假设为“ File” )。 On clicking "file" it must shows 3 buttons. 单击“文件”时,必须显示3个按钮。 "Browse","save","close" . “浏览”,“保存”,“关闭” GUI must be like this http://prntscr.com/35qlf3 (Like on click to "file" there are is a window that opened so the same way it must open a window containing these 3 buttons and then on clicking these 3 buttons must open another window where i have some text boxes and buttons). GUI必须是这样的http://prntscr.com/35qlf3 (就像单击“文件”一样,有一个打开的窗口,因此必须以相同的方式打开包含这3个按钮的窗口,然后单击这3个按钮打开另一个窗口,其中有一些文本框和按钮)。

Whereas on further click to "Browse" will open a window on same Internet explorer(don't open new IE window) where i will have a button to "Browse" a file and will further browse the file on click to it (I already have the code for browsing but have no idea to create an interface of Parent-Child buttons like this). 而在进一步单击“浏览”时,将在同一Internet Explorer上打开一个窗口(不打开新的IE窗口),在该窗口中,我将具有一个按钮来“浏览”文件,并在单击时进一步浏览该文件(我已经有用于浏览的代码,但不知道创建这样的“父子”按钮的界面)。

And there simiral kind of functioning associated with all other 2 buttons clicks as well(I mean they will also open a window on their click in the same place and on the same Internet explorer window). 并且所有其他2个按钮的单击也具有相似的功能(我的意思是,它们还将在同一位置和同一Internet Explorer窗口上单击时打开一个窗口)。

Any ideas how to achieve it ? 有什么想法要实现吗?

Any link or piece of code is most appreciated. 任何链接或一段代码是最受赞赏的。

Make use of child Windows in Silverlight.This how you open child window from Main Page in Silverlight, 在Silverlight中利用子窗口。如何从Silverlight的“主页”中打开子窗口,

        var ChildWindow1 = new ChildWindow();
        ChildWindow1.Show();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM