I'm building a xamarin.forms mobile application with Prism, and want to use INavigationService.SelectTabAsync method. This method, according to the Prism documentation, should be in the Prism.Navigation.TabbedPages namespace but Visual Studio tells me that that no such namespace exists.
I have found absolutely none with a similar issue and when I search for the method name in google I get a measly 7 results back.
I have also tried making a completely new xamarin.forms app through the Prism template pack and still nothing shows up. I even tried installing all the prism Nuget packages and messing around with adding references to the project, but nothing...
This is what the Prism docs tells me to do:
Selecting a Tab
You can select a tab programmatically from within a tab's ViewModel by using >the INavigationService.SelectTabAsync method. In order to use this method, >you must add the Prism.Navigation.TabbedPages namespace to your ViewModel.
using Prism.Navigation.TabbedPages;
async void SelectTab(object parameters)
{
var result = await _navigationService.SelectTabAsync("Tab3");
}
And this seems easy enough but when no "TabbedPages" shows up in Intellisense for me (only the Xaml one) in the Prism.Navigation namespace I'm stuck.
Version details:
Visual studio 2019 16.0.1 Preview 1.0
Visual studio 2017 15.9.5
Try ver7.2.0.1175-ci in myget org.
Add "https://www.myget.org/F/prism/api/v3/index.json" to package source and check "include prerelease".
Please, try to add the TabbedPage using the Prism Template as shown in the attached image. In addition to that, this Video by Brian Lagunas somewhere around 1:06:00 could help.
Hi I am trying to use the Windows.ApplicationModel as in this example
https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Package
However I am unable to import the dll.
using Windows.ApplicationModel;
results in an error although I am using .NET Version where it should exist. Also I cannot find it when I try to add the reference.
Any Ideas?
I need it to get some packe Informations about Programs that run in the ApplicationFrameHost.
From what I can tell, you need the Windows SDK 17134 version that comes with the UWP development package in the installer. Then you can use that namespace. Google also led me to this link which might help: https://blogs.windows.com/buildingapps/2017/01/25/calling-windows-10-apis-desktop-application/
I was recreating this sample about using motion API for creating an Augmented Reality app for WP8.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202984(v=vs.105).aspx/css#BKMK_CreatingaSilverlightbasedAugmentedRealityApplication
I followed everything right. Used the correct using statements too. But the Viewport is not detected as a class in microsoft.xna.framework.graphics or microsoft.xna.framework.
I tried to look everywhere on the internet regarding this, but in vain. I even installed the xna framework to get those dll files for microsoft.xna.framework.graphics.dll and others. But when I add the dlls manually as references I get the following error.
"A reference to a higher version or an incompatible assembly cannot be added to the project."
Without viewport, the app is useless.
How do I add the xna framework class library to VS2012 so that my app looks at that dll file ?
There is no Viewport class in WP8. However there was the same problem with the GART toolkit, and it was solved by implementing a Viewport class. You can go to the project page and browse the source code to see how it is implemented:
http://gart.codeplex.com/SourceControl/latest#GeoARToolkit/NonXnaUtils/Viewport.cs
Since moving on to a new PC I've been having trouble getting a project to run on it, specifically the problem is with some of the controls from the WPFToolkit.
On my previous set up I'd downloaded WPFToolkit and unblocked the DLL's and they'd worked (after some problems). However, this time I downloaded them via NuGet and they aren't blocked where they are stored in the packages/Extended.Wpf.Toolkit.1.9.0/lib directory.
However, I'm now getting errors like :
The name "AutoCompleteBox" does not exist in the namespace "http://schemas.xceed.com/wpf/xaml/toolkit".
or
The type reference cannot find a public type named 'AutoCompleteBox'.
I'm referencing the files in the XAML with :
xmlns:controls="http://schemas.xceed.com/wpf/xaml/toolkit"
From all the research I've done on this problem that seems the right way to do it and it worked when I was on my previous machine.
Is there something obvious I'm doing wrong here?
AutoCompleteBox is a component of the "original" WPF Toolkit which is also available on NuGet under the simple name WPF Toolkit.
The Extended WPF Toolkit Community Edition is a completely different control library developed by Xceed. The controls from the original WPF Toolkit are not included in the Extended WPF Toolkit.
In your project, simply remove the NuGet reference to the Extended WPF Toolkit and instead add a reference to WPF Toolkit.
To access the AutoCompleteBox in your XAML file, add the following namespace reference:
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
I am learning how to create a Class Library (Windows Store apps) and used a UserControl template to add a user control to it.
Then I added a Grid tag to accompanying XAML. However, the tag is underlined with blue squiggles and when I hover over the tag there is
Grid is not supported in a Windows Presentation Foundation (WPF) project
tooltip shows up.
The library seems to build without errors. I've added the library to an application and use the control in its code. The application is also builds just fine. However, when I run the application I get XamlParseException exception.
I am using Visual Studio 2012 RTM. Both the library and the application reference only two standard assemblies (.NET for Windows Store apps and Windows).
What I might done wrong and how should I fix the library?
In my case I switched from Debug to Release, and then back, and the error was gone.
Go to "Build > Configuration Manager..." and Make a new platform for x86 for all your projects.
It doesn't have to be the active one, you can leave that as Any CPU.
Hope it works as for mine...
I've recently had the same error and found the following in the output window:
10>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFX.targets(268,9): error MC6000: Project file must include the .NET Framework assembly 'WindowsBase, PresentationCore, PresentationFramework' in the reference list.
The solution for me was to add the missing references to my project.
For me it helped to set the "Target framework" in application-properties to .NET 4.0
This appears to be a bit of a "catch-all" for a number of XAML resource errors. I've found two causes so far:
Declaring a Resource outside of the appropriate context- e.g. directly in a UserControl tags, not UserControl.Resources.
Forgetting to include the correct namespace for the "unsupported" class. Example in a basic ResourceDictionary, with no sys namespace defined:
<ResourceDictionary>
<sys:string>I'm not supported</sys:string>
</ResourceDictionary>
I was able to solve my similar issue of..
UserControl is not supported in a Windows Presentation Foundation (WPF) project
.. by removing the PresentationFramework reference and re-adding it via nuget.
[Reposting comment as answer]
I was able to complete the steps with no issues, and it appears you were able to as well. Perhaps there was some other inadvertent modification/setting that was made?
This is xaml getting itself confused. I have the error on one project and not on another. Have a look at the top of the xaml before the grid error and see if there are any references to other controls. Try making a modification that will cause and error and rebuilding one of those controls. Then put it back the way it was to get a succesful build and see if this makes the grid error go away. (it did for me)
Much Like Felix D.s answer, I found from the .csproj file a reference was removed.
Obviously replace the 3 with your needed framework, or use the project properties to set the version ( i think that adds this reference )
Evil Dog Pie was step 1 for me, as some other issues came up. There is always a heap of information in the output log
<Reference Include="PresentationFramework">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
This problem is due to the low version of .NET that you have chosen in your project.
To solve the problem, select the Project from the up menu and then select your Project Properties and from the part of Target Framework select higher version of .NET Framework!
I hope your problem is solved.
Yours sincerely