Can I develop a Windows Universal Application using DirectX and C# - c#

I've seen that there is a template to do so in Visual C++, but not in C#. Have I to stick to C++ to develop a Direct X (Universal) application ??
Can I use C#? If so, how?

Have I to stick to C++ to develop a Direct X (Universal) application?
Technically, you can use the DirectX in .NET platform by using the interop technology. SharpDX has done such kind of things for you and you can easily use the DX in you .NET project including the Window 8.1 and Windows Phone 8.1 app project. However, as I just tested, the SharpDX has not supported the Windows Universal App yet.

Since you must use C++ when calling DirectX APIs, so if you want to develop your Windows Universal Application by C# and DirectX as the same time, the best practice might be to package all the DirectX related functions in a separate C++ WinRT component. Then you can include it in any C# application.

Depending on your needs for DX, you might want to look into the Win2D project from Microsoft, its C# and lets you mix 2d and 3d.

Related

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.

Is it possible to write common graphics code to render visualizations on different platforms (Windows 7 and above/Android/IOS/ Windows mobile)?

We have a custom built data visualization control to draw charts. It was developed using win GDI APIs and the application is built using C++ COM/ATL.
Now we have a requirement to port this module to C# .NET (for maintainability).
The requirement is that the ported .NET control should work in Windows 7 and above (preferably Vista also). The straight forward approach is to start porting the code and replace the C win GDI APIs with .NET GDI+ APIs.
However one additional requirement is to investigate the possibility of reusing the newly written C# .NET code and deploy the same as apps in IOS/Android/Windows mobile (cross platform). I have come across Xamarin, but it looks like I cannot reuse the C# .NET code containing win GDI+ APIs directly.
Q1) Is it possible to reuse the ported GDI+ C# .NET code for developing mobile apps (may be using Xamarin)
Q2) If the answer for above is No, and we chose to start developing the control from scratch(in contrast to porting), What are the alternative approaches? i.e. what rendering libraries can we use?
Suggestions regarding existing visualization libraries which can be used in Xamarin, so that the developed app will work on all platforms are also welcome. The catch is the library needs to provide flexibility for us to add custom interactions to the visualizations.
Thanks!

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.

developing tool for building Android/Iphone app

I have .net c# background(don't mind to learn new language to get the things right). Right now i want to make some small applications for Iphone/Android phones.Basically, i will show some graphs with data retrieved through my webservice.
Can anyone tell me which developing tool should i use to create those small apps quickly?
I don't have any experience with Flash.And i just know that Flash builder 4.5 can convert Flash applications to Iphone/Android. However, i don't feel like that it is a native way to build Iphone/Android app
But if you advise that, i might go that way.
thank you
Xamarin has products that allows you to use C# (and your existing skills) for both iOS (iPhone / iPad) and Android devices : MonoTouch and Mono for Android.
disclaimer: I work for Xamarin
You might want to use frameworks that help build apps for multiple platforms with the need to know native programming languages. PhoneGap is one of these popular frameworks.
You can use C# to create a WCF service. There are a few different libraries to develop Android applications. If you want to work with C#, you can check out Mono for Android.
http://docs.xamarin.com/android
From my knowledge, however, Java is the preferred language to develop Android application. Eclipse has a great plugin which integrates with the Android SDK / Emulator.

Cross platform apps with WPF

I'm thinking of developing a desktop app in C#. Although windows will be my main target, later I'll try and run the app in MacOS X and linux. Can I do this today, in a simple way?
I'm aware of the mono project, but it is not clear to me if I can do this in a simple way.
Also, what is the relation between WPF and Silverlight? AFAIK Silverlight follows a plugin model much like Flash or Java. Can I develop my desktop app with Silverlight and deploy it on windows, linux and os x without much changes?
Any pointers will be greatly appreciated.
The Mono project does not support .Net 3 and WPF yet, and it will probably been some time before that happens.
Silverlight might be sufficient for your needs.
As of Silverlight 3.0 you can run Silverlight outside the browser, even create a shortcut to it on the desktop.
Last I heard, the Mono project has no plans to implement WPF, however they are working on other .NET 3.5 features, especially LINQ and ASP.NET MVC. The problem with implementing WPF in Mono (beyond the size and complexity of the API) is that on Windows it uses DirectX for rendering, so an implementation for Mono would need to use OpenGL. Definitely not a trivial undertaking.
WPF is used to build desktop applications for Windows only. Currently no other platforms are supported. If cross-platform support is a must, you can create a browser-based application and use Silverlight. Silverlight runs applications in the browser, though, so you cannot make a "desktop" application using that.
Mono is working hard to make sure that Silverlight runs cross platform (as mentioned on one of the stack overflow podcasts). So that seems to be a good way to go.

Categories

Resources