Create a SIlverlight wrapper class for Runtime apps - c#

I'm trying to play multiple sounds simultaneously on a Windows Phone 8.1 Runtime app using SharpDX but it has quite a few drawbacks (instability, difficult to maintain and an annoying background noise whenever the XAudio engine is running). I really want to use the SoundEffect class in the XNA framework but it's only available in Silverlight.
My question is, can I add a Silverlight class library to my solution, create a custom class which wraps around the XNA framework libraries and then use this custom class in my main Runtime project to play the sounds? Or is there any other way to make this work?

You cannot reference a XNA class in a Windows Phone 8.1 XAML project and there is no way to write a wrapper (because that would mean referencing it in a Windows Phone 8.1 XAML project). You just have to find a solution that does not use XNA.

Related

can .net windows forms project and .net UWP project be merged?

I have a GUI windows form app written in .NET .
And I have a new .NET UWP app that has UWP camera and UWP sockets.
Can I port the UWP camera and UWP sockets code into the .NET Windows form app project?
(If I went the other way, it probably will take much longer to port the Windows forms GUI into a UWP GUI.)
WinForm project can use most new Windows 10 API designed for UWP. Check this post.
If went the other way, you need to port bit by bit of the existing GUI, so it all depends how complex your WinForm GUI is.
The first challenge is you are using XAML, another language instead of C# to write UWP UI.
Some WinForm controls you are using just do not have a UWP counterpart, you need to turn to the community to check if there are alternatives that are freely available l, or purchase proprietary product, or write your own control.
No. WinForm and UWP projects are very different. UWP are compiled to native code and WinForm are compiled to IL that are then run by the CLR. Microsoft is currently working on the ability to put a UWP control inside a WinForm application. You can check it out here.

Is it possible to port a WPF 3D app to UWP / UAP

I wrote an WPF app using all the 3D stuff of WPF which contains several Views displaying 3D data. IMHO WPF is not the platform for further development of the app so I am searching for some ways to port it to a Universal App/Windows Store App/UWP.
The way, Microsoft is promoting, is to use Unity meaning a complete redevelopment and complicated workflows because it should be a 2D-App with some 3D views.
The other way I was looking at way using Helix-Toolkit, because it does not just offer the WPF-way of displaying 3D but also the DirectX way using SharpDX. Unfortunately the progress concerning UWP is pretty low and not currently usable in the extend I need (like displaying custom geometries etc.).
Is anybody out there who got the same problem and found a workaround?
TY!
You may also like to consider Monogame. Like Helix-Toolkit it's based on SharpDX (when it's on Windows anyway). It's not quite as "componentised" as Helix-Toolkit but it's possible to make your app UWP-first and Monogame-second.

Is it possible to Convert or wrap C# APP to IO Xcode Apple APP and Android

I have an app developed for windows 10 on C# and now I want to move to IOS and Android. I have heard of xamarin and used some of there stuff in C# but would it be possible to embed the C# code and move it to apple xcode without having to redevelop the app from again?
would it be possible to embed the C# code and move it to apple xcode without having to redevelop the app from again?
No, it is not possible. Basically you can share some UIs across different platforms, but I think redevelop your app for each platform is necessary.
Not sure if you want to use Xamarin.Android and Xamarin.iOS or Xamarin.Forms to develop your app, you can use C# for development by using Xamarin, it provides a cross-platform implementation of the extensive features in .Net framework, but the actual implementation on each system is very different. For more information, you can refer to Understanding the Xamarin Mobile Platform.
For Xamarin.Android and Xamarin.iOS, you can refer to Android Architecture and iOS Architecture.
For Xamarin.Forms, you can have your UIs and some basic features designed in the PCL in order to share across different platforms, but for most features just for example like working with files, we need to access the native method of each platform, therefor, Xamarin.Forms provides a locator named DependencyService to achieve this.

Reading web camera with MediaCapture on windows desktop

I need to process frames from web camera on Windows 8.1 phones, tablets and desktop.
I already have implementation for phones and tablets (=store apps) that uses custom media foundation transform to access the frames. Now I’m working on a desktop version.
MSDN says MediaCapture class is supported on both store apps and desktop apps. The third-party MediaCaptureWPF works OK in place of the missing CaptureElement.
However MediaCapture.AddEffectAsync documentation says “effectActivationID: The class identifier of the activatable runtime class that implements the effect.”
And I can’t use a custom WinRT component in a desktop app.
There's also another option to add an effect, MediaCapture.AddVideoEffectAsync, that takes the IVideoEffectDefinition argument instead of the class ID. However that interface is only supported on the phones.
So, my question is.
Can I use MediaCapture class + custom MF transform on Windows 8 desktop platform? How?
Or do I need to developer an MF source reader just to support the desktop platform? Of there's better way?
Thanks in advance.
Looks like MediaCapture isn't compatible with custom MFTs when running on desktop.
I ended up implementing media sink instead, based on the code from this article.
Unfortunately, the relevant parts of the media foundation framework are marked “[desktop apps only]”. It looks I will have to support 2 distinct versions of the frame grabber, one for the desktop, another one for the store + phone.

Metro Games in c#

Is it possible to use DirectX in C# to create metro game for windows store? XNA isn't supported as far as i know so what are capabilities to create game for metro?
Yes is possible, you can use SharpDX, new version supports Windows store apps (WinRT).
SharpDX is open source project and you can use it in your commercial applications without a charge, more here : http://sharpdx.org/about/licensing
here is the example of usage and some tips :
http://channel9.msdn.com/coding4fun/blog/Making-Modern-UI-Managed-DirectX-Apps-with-SharpDX-Updated-for-Win-8VS2012-RTM
You can leverage your XNA investment via MonoGame which in turn relies on SharpDX. Check out Bob Familiar's blog posts to get started. (And yes, it's also free).
I you know C++, you can write the graphic part of your project in a separate Library written in C++ and using DirectX directly.

Categories

Resources