I am trying to invoke this method NavigationService.Navigate
from a class which extends a BaseCommand class (it is a cordova/phonegap plugin) and not a PhoneApplicationPage.
But the framework cannot find it neither Frame
How to achieve it and change the page?
I am using wpsilverlight 8.1
Cordova Windows platform for 8.1 doesn't use Silverlight but uses WWA. So you would need to reference WinRT and WinMD for your scenario. Let us know more about your application and questions you have with our tools. Thanks!
Related
We know that Desktop application can be converted into UWP apps.
But I want to Convert My UWP App into Desktop WPF Applictaion.
How to achieve this ?
There is no simple way how to achieve that. Even the conversion from desktop app to UWP app is not really a conversion - it just packs the desktop app in an APPX package so it can be published to Windows Store.
The only way is to rewrite your code.
I am developing a Hybrid App for iOS,Android,BB and Windows using IBM Worklight.
I am using AngujarJS as the framework along with HTML, CSS and Bootstrap.
As this being a SPA, we are using ngRoute/UI.Route (Need to decide on whether to continue with ngRoute or UI.Route) to route between pages.
While the app works fine on iOS, Android and BB, it does not render anything on Windows Phone 8 Hybrid App. Meaning, it is not able to pick the file when we say
templateUrl : 'views/Login.html'
One blog suggested that we will have to give absolute path in order to make it work like -
templateUrl : 'www/default/views/Login.html'
But this is not the correct solution. Is there any setting that we need to do in order to make it work on windows8 phones.
Thank You in Advance.
I'm not convinced this has to do with AngularJS, but rather to plain JavaScript used in jQuery in conjunction with Windows Phone8, which is notorious to not work well when it comes to web-based multipage apps.
See the following questions for related issues:
Using jquery mobile in IBM Worklight for WIndows Phone 8
IBM Worklight v 5.0.6 - Can't navigate multipages on Windows Phone 7.5 environment
IBM Worklight - $("#pagePort").load() not working in Windows Phone 8
IBM Worklight 6.0 - WL.Client.reloadApp() not working in Windows Phone 8
The problem was the path used.
Take a look at the multi-page sample project provided in the IBM Worklight Getting Started webpage. It contains special handling for WP8 which you may need to apply to your project.
Building a multi-page application training module
Multi-page sample project
Note how the path is handled specifically for Windows Phone 8.
common\main.js:
var path = "";
function wlCommonInit(){
// Special case for Windows Phone 8 only.
if (WL.Client.getEnvironment() == WL.Environment.WINDOWS_PHONE_8) {
path = "/www/default/";
} ... ... }
Conclusion: You need to account for the path for WP8 vs other platforms.
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 am developing Windows 8 WPF desktop app. I need to preview webcam into my app. I come to know that MediaCapture class allows this (http://msdn.microsoft.com/en-US/library/windows/desktop/windows.media.capture.mediacapture) but I am not able to use MediaCapture classs into WPF app any idea, any help how to do this ? Thanks.
Update: I am using following code and it crashes:
async private void StartWebCamPrev()
{
Windows.Media.Capture.MediaCapture mediaCapture = new Windows.Media.Capture.MediaCapture();
await mediaCapture.InitializeAsync();
await mediaCapture.StartPreviewAsync();
}
The Windows.* namespaces belong to Windows Runtime (WinRT). Most of WinRT UI APIs are not available for desktop/WPF/.NET applications, so your approach won't work. You can use almost any other technique to display webcam preview, since WPF apps can integrate with a lot of other technologies - DirectShow being most notable. I would start with WPF MediaKit.
I would really like to use Silverlight for a project I'm working on but I will need to interact with an application running on the user's desktop. Is it possible to do this with Silverlight, or am I stuck with ASP.NET + ActiveX?
You can use Silverlight as an ActiveX component in a standard windows application... See alternate hosting: http://code.msdn.microsoft.com/silverlightalthost
If you have to do this via a Web application, you could write a custom signed ActiveX component and interact with it from Silverlight (via JS bridge)
Silverlight applications run in a sandbox on the client and cannot communicate outside except through sockets or ports. You'll probably have to go ActiveX.