in this case , without using third party controls, load Html content in silverlight child window.(SL-4 InBrowser Application)
There is no built-in way in Silverlight 4 to do this in browser. The only way to do this in browser is to use javascript interop. You have to run the Silverlight app in Windowless mode, and create a div on the web page that is placed on top of the Silverlight application. You then have to move that div around based on the current coordinates of the Silverlight windows using javascript interop. This is not entirely trivial. Good luck.
Related
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");
}
I have a visual basic web application and i placed a textbox on the form. When I look at the actions available for that textbox, the only actions available are DataBinding, Disposed, Init, Load, PreRender, TextChanged, and Unload. Why is KeyDown not available? Is it because this is a web application as opposed to a windows application? Is it possible to build an event handler that will fire the when a key is pressed? Maybe I have to convert my project to a windows application?
Yes, that is the reason. Remember that, in a web application, functionality is split between server and client. If you want to react to keystrokes then you need to do that on the client side, which means using JavaScript.
You are using Asp.Net Web Forms application. The very reason it exists is to help developers who previously worked on WinForms applications to move towards Web Development. This is why there are some similarities, e.g. WinControls <-> WebControls. But don't forget, you are in the WEB now. Your Button_onClick event works completely differently. If on WinForms this is invoked directly by button press; on the WebForms, your form is translated into HTML page with <form> and <input . . .> tags. And it builds javascript automatically, so when you press the button, there is a POST call to a server. Then, your server receives request, and directs execution to Button_onClick during so-called "page cycle".
Once you decide that your app needs to be a web app, you should probably forget doing it using Web Forms because this system is not true web development. A true web-centric development would be Javascript-based UI, may be using some framework like Vue or Angular with Asp.net Web Api as server app. May be you should start with Asp.net MVC. This will make you concentrate on single application, because server and client components are developed together when you use MVC.
Going back to main question - yes, 2 different systems, do not expect compatibility. And even when something seem similar, they might behave differently.
Why do you want to capture the keystroke?
You can control that the TextBox is entered by code, for example, that only numbers are entered;
asp:TextBox ID="TextBox3" runat="server" Width="50px"
AutoComplete="off" MaxLength="20" type="number" step="any"
TabIndex="9">
Is it possible to sync the innerHTML of 2 divs (or any other HTML element or ASP.net control) via Pusher?
My 1st page has an div that I use to insert iframes to PDFs/other files via jquery. I am trying to find a way to also push that data to a div on another page, so that clients can see what files are being displayed.
Please excuse me if this is a naive question - I am new to Javascript and Websocket.
I am building my site via ASP.NET MVC4, if that makes a difference.
Thank you
It's probably not a good idea to send the actual HTML code over Pusher as that can turn out to be quite a lot of data. Have you considered sending the URL for the iframes to each connected client so they can synchronise and load up the same page?
I have found how to load the local html page in Webview XAML Control
Visit winrt: load local html and its resources in webview
What i am unable to find is how to access the HTML DOM Object of the Webview Control
I am developing a C# metro style windows 8 application,i want to capture the user signature,since there is no control yet in winrt xaml for that,i am trying to do that using JQUERY
My SignatureCpture is loaded in the webView,after the user has finished signing i need to read the signature,for which i have to access the HTML DOM of the WebView
I have some hidden field in the Page,i need to use document.getElementByID('') to get the value and store it in database
please refer to this sample code in MSDN Code Gallery: XAML WebView control Sample. In the 5th scenario, it demonstrates how to access the html dom.
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.