Good framework for a C# developer to use for visually stunning presentation layer - c#

I am about to write a front end app, which will be used as a media center app. It will plug directly into a high definition TV. Essentially transforming my laptop into a media player. While this concept is not new, I want custom functionality, so this is why I am not reusing existing products.
I'm a C# developer, so the app should ideally be written in C#. And there is 1 other consideration, I need to accept input via the MCE Remote.
I was considering using Silverlight for this. Would you recommend this? Or any other recommendations for frameworks before I begin planning around this.
Thanks in advance.

This is the type of stuff that the Windows Presentation Foundation was meant for. You'll get a lot more access to the hardware than Silverlight would provide (I.E. that MCE remote you mentioned). You mark up your UI with vector graphics/XAML, and then perform the logic with C#.
EDIT: WPF also has support out of the box for animations which can make your UI a lot more interactive.
EDIT 2: Scott Hanselman has written a really cool application called BabySmash and posted the source online. It basically intercepts keyboard input and shows shapes and sounds on the computer. It's a good "child-proofing" method for your PC. The code could provide you with some insight into WPF and how to do the animations and interactivity that you're looking for.

Is this a desktop app? If so I would use WPF. Silverlight is a subset of WPF, so using WPF you could potentially do more.

Silverlight or WPF, if you want some extra power. Both have a similar programming model (with XAML and code-behind) so you might be able to start with Silverlight and move up to WPF if you need.

The VLC api might be useful for playing your media, someone has created a C# wrapper for it:
http://wiki.videolan.org/.Net_Interface_to_VLC

WPF is certainly the way to go, and for playing media check out the excellent WPF MediaKit: http://wpfmediakit.codeplex.com/ I've used it successfully in many projects.

Related

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.

Windows 8 DirectX SwapChainBackgroundPanel Questions

I come from two distinct backgrounds: I have much experience with WPF/XAML/C# app development and equal experience with C++/DirectX development. I hear about the ability to use DirectX and XAML together and I get all excited, but now I have hit this wall.
I'm trying to use the SwapChainBackgroundPanel in a WPF application. But I'm trying to use C# as the underlying language. I keep running into issues where, regardless of the type of C# project I create (PCL, WPF, Windows Store) none of these types are defined [namely I've been looking for SwapChainBackgroundPanel and some other DX stuff like the device and etc.)
So my question is: how does this work in C#? I've seen the simple shooter example from the MSDN done in C++ and it makes sense; I get it. But I feel like I'm missing one of those "gotcha's" when trying to do it in C#.
Any advice, or maybe a link to an example, or at best a little tutorial on setting up a C#/XAML/DX app would be amazing. Thanks everyone.
There is no SwapChainBackgroundPanel available to a WPF app (that is in PresentationCore). The closest you are going to get is the D3DImage class, but it's not exactly the same. See this discussion.
I don't think you can fully utilize the DirectX capabilities of a Windows 8 Store app (SwapChainBackgroundPanel) from C#. You're going to have to do your DirectX work in C++ as in the example you described. You can certainly combine the three (Xaml, C#, C++) as in this example, but I don't think a 100% C# app is possible.
The answer is wrong. It is possible to fully utilize C# throught a wrapper.
I did this myself with SharpDx which is actually one of the microsoft recommendations to use DirectX in C#.
As for the choice of XAML Library, Universal Windows App 10 or Windows Store App 8 is the way to go. Use a SwapChainPanel instead of SwapChainBackgroundPanel.

Gesture-Controlling Javascript InfoVis Toolkit via C# (Kinect SDK)

I've been running around the web for a while now looking for a solution to this problem, but I'm quite disheartened by now to find something that will fit all of my requirements. So here goes.
I'm trying to build a desktop application that uses the Kinect for Windows sensor to control a visualization of digital library (as in, the place you go to for books) assets. I'm quite versed in using the official MS Kinect SDK and already have a neat utility framework for prototyping at hand, so I'd obviously love to make use of it. This plus the desktop app theme of things says the whole shebang will need to be in C#, which is fine by me.
On the other hand, the visualization part already exists and looks gorgeous, but it's JavaScript (and specifically, JIT i.e. javascript infovis toolkit). It has all the bells and whistles I need and it's neatly animated. Also, I'm a noob at JavaScript.
The point is, how do I avoid rewriting either one into the other's language while still allowing them to talk at runtime?
So, do you know any way to either
A) embed a JIT visualization (e.g. radial tree visualization) in a windows application in a way that allows me to manipulate the graph at runtime from a C# class (e.g. selecting a new node to be animated into focus) or
B) send C# events to JS to react to gesture input at runtime? Is this something ASP.NET can do?
I have a feeling the result will be a weird mix of desktop and web technology, but any pointers to the right sort of technology is greatly appreciated.
Maybe you should look at this projects about using Kinect with JavaScript:
http://research.microsoft.com/en-us/projects/kinectedbrowser/
http://kinesis.io/

Do games like Starcraft 2 use Windows Forms to build their UI?

This may be a dumb question...
When I log into Starcraft 2 and see that beautiful UI, I can't help but wonder if it's designed using Windows Forms (.Net or C#). Is the login box just some kind of Windows dialog or do they do their own thing - whatever that may be?
Is it possible to get that much customization within Windows Forms?
No. Games and other apps that use DirectX to take control of the video device don't use WinForms or even the Win32 API for screen output.
StarCraft 2 most likely implements its own windowing and UI system, completely independent of the Windows API or WinForms library.
Yes, you can write an app in C# to perform similar DirectX graphics output, but using DirectX is not as simple as working with WinForms. I wouldn't recommend attempting to write a DirectX app as a way to teach yourself C# unless you are already very experienced with DirectX through other languages or tools (C++, mostly).
WinForms is fine for learning C# and whatever IDE tool chain you choose to use. After you're comfortable with C# patterns and terminology, then tackle learning how to write DirectX code with C#.
No. They use DirectX. DirectX bypasses normal windows and operates at alower level.
You can customize a form to a great degree. You have full control over painting it to look however you want.

How to use XNA in WPF?

So... I want to make a game, and I want to write it in C#. In the past, I've made a mario clone using C++ and OpenGL. I quite like OpenGL, but I don't know how well it's supported inside C#/WPF. Also, it might be beneficial to use an actual game library? I guess XNA is the game library for C#, so maybe I'll invest a bit of time learning that.
However, I want to use WPF form controls for my level editor... is there any way that I can embed an XNA (DirectX?) window inside a WPF app?
Specifically, I don't need any buttons or things inside the XNA/DirectX widget, just around it, so no mixing required...just need to get a graphics widget in my WPF form.
Nick Gravelyn explains how to do it on his blog.
Although, if it's just for an editor, you may find using WinForms is easier and better supported.
First of all, you should ask this on gamedev.stackexchange.com. But I've seen a tutorial embedding XNA.
You should check this question and this page. They are on Windows Forms, but they'll help.
Also check this and this articles.
Keep in mind one thing. XNA is meant to be used for the whole game, integration would be useful on making level editors like you say, but not for a full game.
WPF uses DirectX, and you can do direct "interop" here is a codeProject article on the subject. Here is an article i dug up where the author is using win-forms and WPF controls in an XNA project. Might be worth a look for you.

Categories

Resources