I haven't been able to find an explanation, or think of a reason why it's not available in non-OOB apps. So why is the toast notification only available in OOB apps?
Silverlight 4 Out-Of-Browser apps can operate in full trust. This is necessary to open a window separate from the primary window. Toast notifications are separate windows.
Related
Is it possible to send a Windows Store Notification using Windows Forms? If so, is there any available documentation for this I could read through?
If you are asking about sending a Toast notification (the rectangular popup in the corner of the screen) then this can be done from a desktop app like your WinForms app. See Quickstart: Sending a toast notification from the desktop and the Sending toast notifications from desktop apps sample
From your question, I understand that you require Message to be thrown in the style of Windows Store Apps. However this is not possible AFAIK - You can design a usercontrol to show Windows Store kinda notification from inside Win Forms application.
I'm trying to create a new UI for an app I developed for the Windows Store using the Windows Runtime API. This new client is going to be a WPF Desktop App. I'm trying to reuse as much code as I can but I'm facing several issues.
Fortunately there's a way to use WinRT in a WPF Desktop app (see this and this)
Now I'm blocked by the following issue:
The MediaCapture class has a method to start the preview of a device, after I've started the preview I can create a CaptureElement to display the preview.
CaptureElement is part of Windows.UI.Xaml.Controls and cannot be used in containers from System.Windows.Controls in which the WPF UI is built.
Am I going anywhere with this approach? what would you recommend? How can I display the preview of a device in the WPF app?
Thanks in advance
CaptureElement can't be used in desktop applications - the documentation says "[Windows Store apps only]". In general - the UI controls from WPF and WinRT/XAML can't be used outside of their respective domains (desktop/immersive UI). In a WPF app you need to use WPF controls - e.g. DirectShow for camera capture,
I'm writing a Silverlight OOB application. Once the user has installed it, I would like the in-browser experience, on next visit, to just have a button to launch the OOB version. I know the API call to detect that it's installed, but I'm not sure to open my main Page control as or within a Window. Currently my in-browser view changes to say "Please launch from the installed shortcut" but that seems like it should be unnecessary. Is there a way to do this?
Thanks.
Unfortunately launching OOB app from the web page is not supported. This is commonly requested feature, but it looks like SL5 is not going to address it.
I am trying to use UI Automation to record screen interactions in my Silverlight app. I have the Automation Peers for my control setup but am not able to figure out how to track these controls.
For my WPF app I would get hold of AutomationElement.RootElement and then navigate down to my App and setup Automation event Handlers on the controls I am interested in.
How would I do the same for Silverlight app? I want the screen recorder to start automatically whenever my app runs. The screen recorder has to sit within my App. But the System.Windows.Automation silverlight namespace doesn't have a AutomationElement class. So how would I do this in Silverlight?
Thanks
Shivaprasad
As you observed, the AutomationElement class doesn't exist in Silverlight: the UIAutomation API is available only in the full .Net framework. Silverlight is only supported as an UI Automation provider - that is, Silverlight applications can be controlled by UI Automation, but they are not able to control other applications.
For this reason, I don't think you're going to be able to create your screen recorder within the Silverlight application - unless you are prepared to resort to some nasty hacks.
Such hacks might include:
Using Silverlight COM Automation to call the new UIAutomation COM API. Users would be required to have the COM API installed on their machines in addition to Silverlight.
Create a "server" application in .Net that you can run on the target machine that does the actual UIAutomation work, then communicate with this from your Silverlight application using WCF.
I want to develop an silverlight application which plays youtube videos. I dont want to let users install my silverlight application on thri PCs, so I would need to play the videos in browser. Is there anyway we can achieve this?
Silverlight 4 comes with a new WebBrowser control which lets you display HTML content (e.g. an iframe with youtube in it). Unfortunately, that control will work in Out-Of-Browser mode only. So if you don't want users to install your app on their PCs, that won't be an option for you.
So the only ways I see to work around that problem are
A) Open a popup (new browser window) which shows youtube content.
B) Use JavaScript to open a new div/iframe on top of your Silverlight app which shows youtube. You will have to enable the so-called windowless mode for your Silverlight app then (otherwise, you won't be able to display any kind of HTML on top of your app).
Cheers, Alex