Wp7 Mango Clipboard access / upgrade project from 7.0 to 7.1 - clipboard

The docs http://msdn.microsoft.com/en-us/library/ms597043%28v=VS.96%29.aspx state the System.Windows.Clipboard should be available in Windows Phone 7.1. I tried using it in the Visual Studio Express 2010 (beta 2 for Mango from June) but when
using System.Windows.Clipboard;
VS complains :
Error 1 The type or namespace name 'Clipboard' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)
Do I miss anything or is this just not ready yet?
UPDATE:
Seems to work if I start a new project targetting Windows Phone 7.1 from the beginning. I just don't know how to change the setting from 7.0 to 7.1...
Thanks a lot!
Chris

Clipboard is a class and not a namespace. Therefore, you cannot declare it in the class header like you're doing it. Simply add a using System.Windows; and use Clipboard.<method> inside the application.
As it was stated in the comments, the problem lies in the fact that a project build for NoDo is used with Mango dev tools. The project was not automatically updated and still relies on WP OS 7.0. To upgrade it, right click on the project in Solution Explorer and click on Upgrade to Windows Phone 7.1.

Related

TargetFrameworkVersion v7.0 could not be converted to an Android API level. Xamarin.Forms (Portable)

I have created new Xamarin.Forms (Portable) application and tried to build but I am getting the error
TargetFrameworkVersion v7.0 could not be converted to an Android API level. Xamarin.Forms (Portable)
Please check the attached screenshot.
Are there any solutions for this?
This problem is resolved now. I have just formatted my Windows 8.1 and reinstalled everything. I have reinstalled Windows 8.1 and Visual Studio 2015 Update 2 and try to rebuild the application and It's working.
I am not sure about the other solution. Maybe there are some other solutions to resolve this issue.
Thank You.

Couldn't Start UWP project in Xamrin Forms

I am starting my first Xamarin Forms application using Visual Studio 2015. The default template provided 6 Project. (Android,iOS,PCL,UWP,8.1,windows phone).
All the projects works correctly including the Android,8.1,Windows Phone Emulator.
But when i try to deploy the UWP project , breaks (Exception) at the first statement where it calls the MainPage inside PCL. This happens in both Local Machine and Emulator. (debug Mode , All CPU).
I have already updated xamarin forms to the latest stable release, updated Visual Studio but i am not able to resolve the issue.
Exception:
An exception of type 'System.TypeLoadException' occurred in
Xamarin.Forms.Platform.UAP.dll but was not handled in user code
Additional information: Could not find Windows Runtime type
'Windows.UI.ViewManagement.StatusBar'.
Please Help
The Windows.UI.ViewManagement.StatusBar is a type that is only available in the Windows Mobile Extension SDK and you have to reference this SDK for it to be available.
Right-click your UWP project in the Solution Explorer, select Add -> Reference, then under Universal Windows select Extensions and find Windows Mobile Extensions for the UWP. Check the one that matches the targeted Windows 10 build version of your app.
You also need to use the IsTypePresent API, which will check at runtime if the type is available on the current device. This is important, because StatusBar does not exist on any other version of Windows 10 than on Mobile:
if(ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar") )
{
//your code
}
Look like issue in xamarin UWP concept , are you updated Xamain.Forms ?
Goto Tools-> NuGet Package manager -> Manage Package for Solution -> Microsoft.NETCore.Universal Windows Platform -> update latest version.
after updated all , still same problem please check here some around
https://forums.xamarin.com/discussion/64731/how-to-solve-unknown-type-in-uwp-app-windows-ui-viewmanagement-statusbar
If none of this work try updating your windows SDK to the latest version. It worked for me. I also added the reference to Windows Mobile Extensions for the UWP.
EDIT:
I also have experimented that sometimes when you update visual studio it fails again. I had to manually change de SDK version in my UWP project, going to Properties > Application > Target Version > Select latest version

MvvmCross - 4.0 Beta 3 doesn't work with new UWP project?

I started a new Windows 10 UWP project today and used Nuget to add references for the beta version of MvvmCross. After adding references to MvvmCross and some HotTuna plugins (like StarterPack), all I get is the following:
I seem to be missing some stuff because I'm unable to inherit from MvxStorePage. Also, when I added HotTune to my Android project, a ToDo.txt file was added with instructions, but in the UWA project, I didn't get any of those extra files.
Am I doing something wrong?
I don't think you can inherit from MvxStorePage, because it doesn't exist in the namespace available to UWP project.
In UWP project, the Cirrious.MvvmCross.WindowsUWP namespace is used. You can check it in Visual Studio in "Class View (Ctrl + Shift + C)". And the only available view is MvxWindowsPage as below.
Based on the Universal Windows App tutorial on GitHub, the MvxWindowsPage is recommended to be used in universal app. Note that, the tutorial is for Universal Windows app for 8.1, but it's same to make it work in a win10 UWP app. Just change the namespace from Cirrious.MvvmCross.WindowsCommon.Views to Cirrious.MvvmCross.WindowsUWP.Views. By doing that, I didn't get any problem to inherit from MvxWindowsPage.

Creating MvvmCross PCL to target Wp7.1 Xamarin.iOS, Xamarin.Android, .Net 4.5 and SL4 and higher

After researching MVVMCross project, I am very keen to use it in a new mobile project and began setting out my project today. All was going fine until I tried to target the exact frameworks Stuart does in the "N=0 : A first MvvmCross Application" youtube video. I've no idea why this collection isn't allowed and I'm not as knowledgeable on PCLs and "profiles" as I could be.
Environment:
I'm using VS2012, although VS2013 is installed also. WP7.1 is installed as is SL5 and Xamarin.iOS and Xamarin.Android. I've tried to repair both Xamarin installations because I thought the issue might have been that I installed WP7.1 after the Xamarin pair.
Also worth noting is that if I uncheck Windows Phone 7.5 and higher then it still won't work. I have to also set Silverlight 5 for the dialog to let me proceed. I'm not sure what more I can do do get this working so I'd appreciate any help I can get. All I want is to basically target the exact frameworks as are in that video mentioned above.
There are no Monotouch or Monodroid projects right now in Xamarin, so that link will not realy help you. They are called now Xamarin.iOS and Xamarin.Android. So what I've done that helped me, I've extended Profile 7, so it now supports WP7, iOS, Android and WinStore and it works great, no problems yet and I've already complete a couple of projects with it. So at that link - PCL Setup - you can find where all the profiles located and with that info try to extend Profile 7 as I suggested. So I've coppied the Windows Phone 7.xml from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.0\Profile\Profile131\SupportedFrameworks to C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETPortable\v4.5\Profile\Profile7\SupportedFrameworks
The video and PCL setup link are out of date now that Xamarin has released official support for PCLs. I'd recommend targeting the following platforms:
Windows Phone 8
Windows Store apps (Windows 8)
.NET Framework 4.5
Xamarin.iOS
Xamarin.Android
And, optionally you can target Silverlight 5.

VS2012 error setting references to mvvmcross for WP8

I'm following this tutorial for mvvmcross and I'm trying to get the "Windows Phone UI" project working. However when I try to set references to the mvvmcross binaries, Visual Studio (2012 Premium) displays an error: a reference to a higher version or incompatible assembly cannot be added to the project.
I am using the mvvmcross binaries from 2013_01_28 as specified in the tutorial and have installed Windows Phone SDK (7.1 and 8.0). I have tried with both WP7.1 and WP8 projects but same error occurs.
Are there perhaps different binaries I should be using for WP8 VS2012?
What am I missing here?
Thanks in advance!
My guess is that you downloaded the files from the Interweb and Windows is protecting you from evil.
Try unblocking the assemblies:
http://pcmusings.wordpress.com/2012/10/31/vs2012-windows-phone-and-the-reference-to-a-higher-version-error/

Resources