If anyone starts developing Windows 8 metro applications using MVVM Light please help me to create a Windows 8 (WinRT) project template. I get bored by using Microsoft ‘s Layoutaware page(Base class). I just need to structure the class with the help of MVVM Light. If any one did this please help me or provide some links to start developing Windows 8 Metro application using MVVM Light.
The major areas where i am facing issues are:
Navigation (Forward and Backward)
State Handling (Tombstoning in windows 8)
Navigation after the app launches form termination state etc.
Handling WebService [ Post using http client ]
There is an (older) example of using MVVM Light with windows 8 found here. There are also templates and Samples as part of the MVVM Light source found here.
Edit:
Here is an msdn example using MVVM Light.
What about this
But I did not try it. I'm using Portable class library (with targets Windows 8.1 and .NET x.xx) and this library is referenced to WinRT project. MvvmLight for PCL you can find on this link
Problem is, that you can't access Local files and Local settings but you can inject it from Presentation project to Portable class library at the start.
This solution has a lot of advantages and one of the is : easiest unit testing.
For more info look this stack overflow thread
Related
I'm working on a xamarin forms (PCL) project (A basic customer care chat app which is meant to run on Android and iOS only) that has just two xaml pages, custom renderers and few dependencies. This project is meant to be implemented into another existing project (which I don't have access to its source code) such that an action would be binded to a button on the existing app to show a page on my own project.
There is need for me to share my chat project with my client's developer but without exposing my source codes, perhaps compiling to dll or nuget package that would be added to the existing project to access my project's functions and pages. I have searched through the xamarin forum and here on stackoverflow but can't seem to lay my hands on a solution.
Is this possible at all? If yes, what am I missing? If no, is there any better option to use?
Please do note that the chat app completely done, so I'm hoping perhaps there's a way I could directly convert the project to a Nuget package.
Thanks in anticipation!
If the host application is a Xamarin Forms one:
-Move your cross platform shared code into a PCL or .Net Standard (ContentPages, ContentViews, Classes).
-Move your Renderers and platform specific code to Android and iOs Class Libraries.
Your client will have to reference your first assembly (dll) in their XF assembly in order to instantiate/manipulate your views/classes and platform specifics one on their Back-end side (taking into account your renderers, effects, etc ...)
A lot of Xamarin Controls Libraries Open Source hosted on Github are working like that. For example this one: https://github.com/jamesmontemagno/Xamarin.Forms-PullToRefreshLayout
If the host application is a native application, take a look into Xamarin forms embedding
Finally, I seem to solve the problem by enabling visual studio to build Nuget packages for the chat app project (summing up to 3 nuget packages) on project build.
Thanks #Rudy Spano and #Micah Switzer for your contributions
Basically, I'm writing an android application and an iOS Phone/Tablet application using Xamarin and I want to have all common code out in a PCL library. All was going fine until I got the following exception:
System.InvalidOperationException: Unable to set the CookieContainer. Please make sure the binding contains an HttpCookieContainerBindingElement.
On trying to add this HttpCookieContainerBindingElement to the binding, I discover that the class does not even exist. My PCL targets Xamarin.iOS, Xamarin.Android, .Net 4.5, and Silverlight 5.
This is a complete and total blocker for me now. Can any of you guys shed some light on this for me and show me a way forward?
I don't have a solution, but there's a long thread on this topic on the Xamarin forums:
http://forums.xamarin.com/discussion/2369/cookiecontainer-missing-in-6-2-1
we have been use cocos2d for windows 8 build metro game . so we want use xaml control UI in cocos2d ?
is there have soluction or suggestion?
just try one night i have been fix this problem. you can click fllow link:
DirectX and XAML interop (Windows Store apps using C++ and DirectX) (Windows) http://msdn.microsoft.com/en-us/library/windows/apps/hh825871.aspx
With the release of Windows 8, you can use XAML and Direct X together in your Windows Store app. The combination of XAML and DirectX lets you build flexible user interface frameworks that interop with your DirectX-rendered content, and is particularly useful for graphics-intensive apps. We explain the structure of a XAML app that uses DirectX, and identify the important types to use when building your XAML app to work with DirectX.
soluction as fllow link:
http://www.cnblogs.com/chenkai/archive/2012/11/29/2794983.html
by chenkai
Here's a template project in my github:
https://github.com/chanyuenpang/cocos2dxaml
I originally assumed that Metro style apps were managed (.NET) assemblies whether they are written in C# or C++ and I thought C++ for Metro style apps would be similar in concept to C++/CLI.
However, I now heard on a DotNet Rocks podcast that Metro style apps written in C++ are native. Nevertheless I understand that Metro style apps run on all three CPU architectures Metro is available for. How is this accomplished? Do Metro style apps come with different binaries and only one is chosen/downloaded? Or is it like on Mac OS X where one binary can contain code for different CPUs?
Code that uses only system or OS services from WinRT can be used
within an app and distributed through the Windows Store for both WOA
and x86/64.
from this MSDN blog page
If you go watch this BUILD video things should start to clear up -- http://channel9.msdn.com/events/BUILD/BUILD2011/TOOL-930C (A .NET developer's view of Windows 8 app development)
Basically there is a CLR (.NET 4.5) running. I didn't say a full CLR. WinRT from a .NET perspective is just a .NET Profile (sort of a way that they can layout the API differently exposing or hiding things). The new WinRT APIs use a new version of [gulp] COM, but it is optimized for use with .NET. I'm not 100% sure on the C++ angle. I suspect with C++, you have a few options. Compile for each platform (arm and x86) or compile to IL. Not sure if this helps you at all (I hope so).
Has anyone managed to get Ninject working in Metro Style app using the Windows 8 Developer preview?
If so how?
Running Ninject in Metro Style apps requires several changes in the implementation of Ninject. Therefore there is no way to run current builds in metro style apps. If you are willing to do the required chages to Ninject then you have to perform the following steps
Create a new MS library project
Add all files from Ninject
Define NO_LCG NO_ASSEMBLY_SCANNING NO_EXCEPTION_SERIALIZATION
Fix all the problems related to the chages to the new reflection API
Otherwise you have to wait until there is an official preview of Ninject for Metro Style Apps which will be available sometime after the Ninject 3.0 release.