Manipulating silverlight media element and associating with jQuery UI Widget - silverlight

I have no background with ASP and Silverlight. As a jQuery UI widget developer, I have to write a seekbar widget for silverlight media element player. I need to understand how should I define an interface for my widget if I have to associate it with silverlight?
How can I intercept MediaElement instance?
How can I know what is total media duration?
How can I know about current media position?
How can I call the player to play from some specific position?
How can I bind events with silverlight player so that with each tick it should invoke my seekbar to get updated?
All I want with JS/jQuery environment. What is the best source to start?
NOTE: I am from linux background, so I have moonlight for my browser.

You should read the JavaScript API for Silverlight reference on MSDN. It will provide answers to all of your questions.

Related

How to get codenameone web browser component input controls references?

Does anybody know how can we get the form controls references in a web page that loaded in the CodeNameOne Web browser component?
I want to load a web page in CodeNameOne web browser component, then read or change the value of form input controls (For example TextBoxes) in the java code after pressing the submit button.
Regards,
Kasra
Its not an ideal way to work and would reduce the portability of your application. You can look at the JSObject class that represents a bridge between the JavaScript and Java sides.

how to set the background color for widget in qooxdoo mobile framework?

I am learning qooxdoo framework and I am going to develop web app on mobile device. However here comes a problem. I do not know how to set the background color for qx.ui.mobile.core.Widget. In terms of qx.ui.core.Widget(Another class, I think this is for desktop application), there are methods to set background color. However, for qx.ui.mobile.core.Widget which is used for developing mobile app, I can find any method in the API reference.
I am trying to do this by 'addCssClass()' method, it works for label and so on, however, it is not working for composite widget. By default, the background image of mobile app is the image used in iPhone group style tableview. However, what I am trying to do is to modify the background image to a pure background color.
I do not know how to accomplish that, can anyone give me some ideas? Thank you!
there are several ways to alter a qx.Mobile widget:
if you use the "getContainerElement()" method, you get the HTML element directly.
There you can set any attribute, you could set in plain HTML, too.
Another possibility is to add a class, as you mentioned: "addCssClass("foo")"
You just have to add your css selector statement to your projects resource folder:
.. resource/ yourproject /css/styles.css
.foo{
background-color:red;
}
or you could even set the style with brute force, through http://demo.qooxdoo.org/current/apiviewer/#qx.bom.element.Style
set()
Now choose your weapon =)

google maps silverlight

I am working on silverlight 4 application and need to implement google maps in the same app.
Now to implement the google maps, i was planning to use WebBrowser control but when i used it i found out that it will run only in out of browser mode.
So, i decided to use another approach since i want to implement google maps inside of my application. I then used http://csharperimage.jeremylikness.com/2010/09/hosting-html-in-silverlight-not-out-of.html alternative which was having to use iframe to show web page there. It was seems to be good alternative in start. But Here comes another twist.
On top of my app, i have one top MENU for navigation, its a classic web menu, user hover over the menu item and its sub item will expand vertically.
Now just underneath the MENU i have above HTML control to display my map. Now since the HTML browser control has higher z-Index so my vertical sub menu is goes underneath the google map and hence it not visible.
And giving silverlight app higher z-Index the iframe for HTML does not show up as it goes behind the app.
So how can i get my HTML MAP and MENU both to work? If you guys have any other alternative to implement google maps then please let me know
Thanks
I would recommend using the Silverlight Bing Maps control, with the tile-source set to Google Maps. This will give you the maps you desire, via a proper Silverlight control. You can find out about how to provide a custom tile source from Google here:
http://www.scottlogic.co.uk/blog/colin/2011/02/google-sky-on-windows-phone-7/

How to embed IE (created using Watin) inside a WPF application [duplicate]

Can I embeded IE in my wpf application and interact with it firing events?
e.g. can I fill a form and press submit button programmatically?
Below is the link to the web browser control for WPF, this control was not part of the initial release of WPF, and was added in 3.5 SP1. As long as you are targeting 3.5 SP1 you can use this control and interact with the content in it. I have a WPF application that does use this control and we do a lot of JavaScript interactivity with the content from the browser by drawing on a WPF canvas and sending that information to the content API of the web browser control.
If you need an example I can look up some code samples from the application and send them your way.

Can I embeded IE in my wpf application and interact with it firing events

Can I embeded IE in my wpf application and interact with it firing events?
e.g. can I fill a form and press submit button programmatically?
Below is the link to the web browser control for WPF, this control was not part of the initial release of WPF, and was added in 3.5 SP1. As long as you are targeting 3.5 SP1 you can use this control and interact with the content in it. I have a WPF application that does use this control and we do a lot of JavaScript interactivity with the content from the browser by drawing on a WPF canvas and sending that information to the content API of the web browser control.
If you need an example I can look up some code samples from the application and send them your way.

Resources