How to use White to test OpenFileDialog on Silverlight 4.0 application? - silverlight-4.0

I'm trying to test an OpenFileDialog that is created when the user clicks on a button in my Silverlight 4.0 application. According to the FAQ, the correct way of finding modal dialogs is this:
Window mainWindow = application.GetWindow("main");
List<Window> modalWindows = mainWindow.ModalWindows(); //list of all the modal windows belong to the window.
Window childWindow = mainWindow.ModalWindow("child"); //modal window with title "child"
childWindow.IsModal; //returns true
However, I'm testing a Silverlight application, using the White.WebBrowser.Silverlight.SilverlightDocument class, which doesn't appear to have a ModalWindows() collection on it.
Could someone please give me a hint as to what I'm doing wrong, & how I should be testing this?

viveksingh has provided the answer over on the White discussion forum:
have you tried finding the ModalWindow
from InternetExplorerWindow object?

Related

Telerik Kendo UI for ASP.NET Core Add/Edit Popup window title and button text change

I am working project that use Kendo UI and I am new to it.
I have been searching whole day for this simple implementation- I need to change the popup window title and button text based on edit mode or add mode.
Here is the latest answer I found: forum
Above link has exact same question I have. But the solution is not working for me.
I tried to use e.Edit() on Events. But it throws an error:
"DataSourceEvenBuilder" does not contain a definition for Edit and no accessible extension method "Edit"
And the e.model is undefined as well
From official page, I don't see Edit method.
Can anyone help? Please don't provide the solution that build grid from javascript.
Telerik version: ASP.NET Core 2022.1.301

Multiple Windows In ASP.NET Core Blazor

I am learning Blazor from a WinForms background. In Winforms I used to create a new form perhaps on a click of a button to display some info or a map then drag it to a second monitor.Can I achieve the same with a blazor app. I see many tutorials on dialogs but I believe that I am correct in thinking that this is not what I am looking for in that you cant move a dialog to diffrent part of the screen or 2nd monitor?
Blazor is a web app technology, so you can't break out of the context of the tab (or tabs) in the same way that you can with WinForms by opening a new form, even dialogs will remain inside the context of the current tab.
I would suggest the following:
Use JS Interop to open a new tab targeting the component that you want opened separate from the current location
Drag that tab onto another monitor.
#inject IJSRuntime JSRuntime
public async Task OpenInNewTab(string url)
{
await JSRuntime.InvokeAsync<object>("open", url, "_blank");
}

Implement search interface Windows Phone

I was looking around, but couldn't find a good reference for how to implement the search overlay for windows phone applications. I want to emulate how search is implemented in the store, music, and other system type applications.
I have the application bar created with the icon, but not sure what is happening when the button is clicked. It appears that some overlay is transitioned in on top of the page. I can emulate this, but since this seems like such a common scenario, I hoped there would be a guide to enable consistent experience across applications.
Application bar with search button: https://skydrive.live.com/redir?resid=1EBF644EEFCAD766!25155&authkey=!AB2pGcqFd9jo4JE
Overlay: https://skydrive.live.com/redir?resid=1EBF644EEFCAD766!25156&authkey=!ALmHpcgyqYyvBfU
There is no official control that does that for you. In my applications I do the following for covering this scenario:
1 - Add search button to application bar
2 - When button is clicked, navigate to a new page (eg. SearchPage.xaml):
NavigationService.Navigate(new Uri("/SearchPage.xaml", UriKind.Relative));
3 - Set focus to the search box in the Loaded event on that page to open the keyboard (doing it in OnNavigatedTo for example will not work):
mySearchTextbox.Focus();
4 - Use the Silverlight Toolkit for Windows Phone to add transitions from/to the page. I use the following animations, which creates a very similair animation style to the built in search pages:
<toolkit:TransitionService.NavigationInTransition>
<toolkit:NavigationInTransition>
<toolkit:NavigationInTransition.Forward>
<toolkit:SlideTransition Mode="SlideUpFadeIn" />
</toolkit:NavigationInTransition.Forward>
<toolkit:NavigationInTransition.Backward>
<toolkit:SlideTransition Mode="SlideUpFadeIn" />
</toolkit:NavigationInTransition.Backward>
</toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
<toolkit:NavigationOutTransition>
<toolkit:NavigationOutTransition.Backward>
<toolkit:SlideTransition Mode="SlideDownFadeOut" />
</toolkit:NavigationOutTransition.Backward>
<toolkit:NavigationOutTransition.Forward>
<toolkit:SlideTransition Mode="SlideDownFadeOut" />
</toolkit:NavigationOutTransition.Forward>
</toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>

how to navigate from MainPage.xaml to other page.

In my apllication there are two from.The default form that is the MainPage.xaml and another form called login.xaml.
I have a button on MainPage.xaml,and my requirement is when the user click that button the Login page should be navigated.
This is my first experience in silverlight can i get that easily understandable code.
this.NavigationService.Navigate(new Uri("/Pagename", UriKind.RelativeOrAbsolute));
In this give your xaml or aspx (/Pagename) only no need to mention .xaml or .aspx
Instead of navigating, you could use a Childwindow
Otherwise, I think, you would have to use the Silverlight navigation framework, but this is quite complex. I'd suggest you to first have a child window pop up if you want to do something!
On Button Event
this.Content=new Login();

Can we Use masterPage in silverlight4 application

Is it Possible to use masterpage with silverlight4 application?
The Silverlight navigation template project available in VS2010 gives you the equivalent of a master page in the form of MainPage.xaml.
There is no master page concept in silverlight. try using usercontrols and implement the master page. Iframe and silverlight controls should do the trick.
Anyways let us wait and hear from an expert if there is a better work around.