C# platform detection between Desktop and Mobile devices - c#-4.0

How can I detect if I'm running a Windows Phone or a regular Windows in C# ? (for Windows 8, 8.1, 10)
C# can be run on those two kind of platforms.

You can use precompilation directives such as WINDOWS_APP and WINDOWS_PHONE_APP to detect regular windows or mobile devices.
You can see more information on this MSDN blog post here:
http://blogs.msdn.com/b/cdndevs/archive/2015/03/06/universal-applications-be-ready-for-windows-10-part-1.aspx
Hope that helps! :)
Shahed

Related

UWP win 10 mobile barcode scan example for TC70x Zebra

I am looking for a barcode scan example to be used with the above windows 10 mobile device . I myself am using visual studio 2017 . The mobile device ha a build in barcodes scanner but is needs software to function .
Something like initialize the scanner and put a scanned barcode into a text box would be very helpfull !!
Thx for any help
#Robert R,
The version of Windows Mobile used by the Zebra TC70x is Windows Mobile Enterprise which supports the Windows.Devices.PointofService.BarcodeScanner API. This API is documented at http://aka.ms/pointofservice. Sample code is available on GitHub, here: http://aka.ms/PointOfService.SampleApp.BarcodeScanner.
Note: The version of Windows Mobile in the TC70x may not support all functionality that is currently available in the sample. Please refer to the API reference at http://aka.ms/pointofservice-api details of API availability. You may need to modify the sample to work on the downlevel version.
Terry Warwick, Microsoft

How is MediaPicker implemented on Windows Universal Platform

Can anyone provide guidance on how to integrate a camera with Windows Universal Platform?
Specifically, I need to see how the MediaPicker service is implemented.
I have searched tirelessly for a working sample of camera integration with Windows Universal Platform (Windows Phone 10).
I have pulled down XLabs and still don't see support for this platform.
I realize Xamarin.Forms only has a preview version of this.

Consuming web services from Windows Embedded Compact 7 (windows CE 7)

What are the options for consuming web services (hosted for example in Windows Azure) from Windows Embedded Compact 7?
WCF from Compact Framework 3.5 is one possibility, I guess. Are there any others?
Can I access web services directly from my Silverlight (C++) application?
Thank you.
I have not tried this myself, but you could try using SPROXY tool shipped with visual studio.
From MSDN: SPROXY.EXE is a command line tool that generates native C++ client code for accessing an XML Web service based on a WSDL description.

Windows CE Silverlight Setup

I have an embedded device,its includes windows CE 6.0 Build 3112.I want to run silverlight application on this device.I downloaded silverlight application,when I want to install it says "Silverlight is not valid application windows CE"
so what can i do?
Thx.
In Addition to ctacke's answer. Not all Windows CE devices have to have any specific component and that includes Silverlight for Embedded Devices.
To check whether your device includes Silverlight For Embedded devices, you can check whether your \Windows folder contains the xamlruntime.dll file. If it does not contain the file, then your OEM did not include Silverlight in the image.
If you want to check out a simple Silverlight for Embedded devices application you can download the code from the following tutorial: Silverlight for Embedded Tutorial
THe issue you're seeing is that while it's called "Silverlight", Silverlight for Windows Embedded really isn't what most developers who know Silverlight would call Silverlight (in fact I wish they'd rename it).
While it does use XAML and that XAML can be created using Blend, the code itself has to be written in heavily templated C++. You can't take a compiled Silverlight binary from anything other platform and use it under CE.

can I run Windows Embedded CE 6.0 on a regular PC?

As i just need the hard RT capabilities, can I install and run Windows Embedded CE 6.0 on a regular PC ? (dell or so ?), and UDP out some data ?
You can install Windows CE in a PC, but you would need to create your own image. See this tutorial in MSDN. Also google for CEPC.
Finally visit Mike Hall's blog. I remember reading a related article there, but I can't find it now. Anyhow, this blog is a great resource for Windows Embedded.
(From working with Windows CE 5.0, so there may be some differences, YMMV.)
You should be able to run Windows CE both in an emulator and installed on the device itself as the host operating system.
In the first case all you need is an emulator, which is provided with the development kit and in a more expensive version of Visual Studio. This will run the OS fine, albeit a bit slow depending on the architecture you choose to build the Guest OS for.
In the second case you will actually need to find or write drivers for the hardware that you want to run on and use. This will require the Platform Builder application (I believe it's a plugin to Visual Studio now) and knowledge of the hardware that you are running on. Windows CE itself does support x86 processors, although I don't remember if it supports all x86 processors (instruction sets) or just 486's.
If you want to go down the second route you also may be able to get an Intel Atom or AMD Geode board support package (BSP) which will help you develop the drivers.

Resources