Using Google Maps with a Windows 8 C#/XAML app - c#

I just installed the Windows 8 RTM/64 bit Professional version on a separate partition, and am learning the details of how to make Win 8 apps. I'd like to reuse some code from an earlier webapp I wrote, using asp.net and MVC3. Is there a way to use the Google Maps API with a C#/xaml app? I guess it'd be a lot easier for me, less having to reinvent the wheel and just pasting code, but I'm sorta at a loss how I'd do it.
The code behind for the asp.net app was written in C#, and it parses XML. On the other hand, could I do this with a JS/HTML5 app? Is there someway I can use server side code in a Win 8 app? I'm not sure if that question even makes sense.
Thanks,
Amanda

The Javascript api would have to be implemented in an HTML5 Win 8 App. However, you could use the static map API. You can certainly use server side code in your Win 8 apps. The main difference is that you need to make Asynchronous calls when calling services. The System.Net.HTTP class can help you with this. The best method to parse XML is with LINQ.

Related

how to use javascript or jquery in windows form?

I'm making this application in c#.net, just for personal use and I'm just making it for practice and to learn more about c#.net programming.
I know java script is meant for web applications, but maybe there are ways to use them in windows applications as well.
No you can't use them directly.
You could technically make a library that parses JQuery and does the same things... or you could make a C# equivalent of the same functionality, but that seems like more work than it's worth.
If you are looking to practice c#.net then practice c#.net, even if you could use javascript/JQuery that wouldn't get you much c# practice would it.
Regular windows (desktop) applications will not run on javascript.
However, windows 8 store applications (either for windows 8 desktop, or windows mobile) can be created using HTML5 & js.
This series should give you a decent start: http://www.microsoftvirtualacademy.com/training-courses/developing-windows-store-apps-with-html5-jump-start#?fbid=ldvGrgy_tPQ

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.

Ideas for a C# UI framework

I need to develop a C# touch-screen desktop application with a "modern good-looking" UI.
How would you approach it? I´ve got in mind using Flash (just for the UI) or WPF... but i´m open to any idea or any third-party C# UI you´d know.
Is Flash easy to integrate with C#?
Thanks for your knowledge!
You should look for a AMF remoting library in C#.
Remoting is when you call a function on your server from flash.
AMF (version 0 or 3) is a binary format used to encode object transfered
between client and server
Weborb and fluorine are solutions for this.
see : .NET and AMF
You will probably be doing well with a third party framework to avoid the overhead of writing user interactions, controls, etc.
A couple of options are
http://xamarin.com/
http://www.resco.net/developer/mobileformstoolkit/
A review of these options is provided here.
I recall combining a flash interface with a C# back-end back in university. There's a method called fscommand() that will take a couple of string parameters (I may be mistaken, read up on it) to pass to and from the interface and the C# "code-behind".Flash is an ok option, but if I were you I'd opt for a WPF interface. I'm a huge fan of the telerik libraries, their WPF one allows you to create the most modern-looking interfaces and dashboards. Not to mention that the skills you will acquire while learning enough about wpf will be hugely beneficial in your career as a developer the way things are going (depending, obviously, on what direction you're heading).
FlashBuilder 4.6 has some nice functionality for quickly building a UI that work on a desktop or mobile device. You could use FluorineFX (free) or webOrb on a webserver to send data back and forth to a database server if that were needed. If you build it with the Flashbuilder 4.6 mobile project template, it would work on a iPad, mac, windows pc, or android device as well. Since a pc touchscreen should use the same type of finger gestures as a mobile app, this might be a nice way to go. (I don't actually have a touchscreen on my pc, but it runs well with a mouse, so I'd assume it worked with gestures too).
Adobe.tv has lots of examples of building a mobile app project (Which also runs on a PC) and there is a Flashbuilder 4.6 free trial.
http://flex.org/

Develop a C# application for Windows Mobile, Android & iPhone

I have a project where I need to build a C# application that is able to run in iPhone, Android and Windows Mobile.
For windows Mobile that is no problem, but I think its a challenge when we try to develop for Android and iPhone.
I've been searching for solutions and i found some information about Mono-Android and MonoTouch.
My question is, has anyone used this API's? Are they good?
Do they really take advantage of Android/iPhone native api's?
Can I with only one source code create an application for both platforms?
And finally, is there any other way of creating a C# application for these mobile platforms?
Yes they are very solid. They give you .NET 4.0 with all of that capability & the ability to share data access, networking/API integration, and business logic in shared assemblies. You'll of course have to write the user interface portion of the applications in C# but specific to the platform.
For example, MonoTouch is like Cocoa in C#. It will feel unlike your typical .NET programming style, so make sure you get comfortable reading Objective-C for documentation & assistance.
Also recommended is to follow the UI guidelines of the platform in question. Don't create a cookie cutter app for all platforms or it will suck everywhere.

Building C#/.NET Apps that Use Windows 7 TaskBar Features

The new Windows 7 taskbar features, like jump lists, previews, etc. are really cool, and I want to allow my C# applications to use them. I have two questions:
First of all, how can I use these functions (in general)? I found two articles by Microsoft about this, but I'm not really sure what to do. Could you provide links to a library, as well as some sample code?
Next, let's say that I figure out how to use these Taskbar functions. My question is, is there some built-in way of checking whether the OS is Windows 7, and thus enabling the taskbar functions? If I didn't have this logic in my app, would it have problems if it was run on a non-Win7 machine?
Thanks!
In the first article you link to there is a sample library that you can download that makes use of the new Windows 7 features.
This article shows how to check the version of Windows your application is running on.
As always, if you call an API that isn't in existence, then yes, your app will experience some turbulence. Remember, it's (almost) always better to check for a condition and act accordingly once (as in application startup) than to try something over and over in code and catch exceptions.
Windows API Code Pack for .NET Framework is your one stop shop for a ton of .NET API for Windows programming, including Taskbar. This library gives you a complete API set to work with Windows 7 Taskbar and then some. It also includes samples for WPF, and Winform.
Another good source for Windows 7 content is the Windows Team Blog

Categories

Resources