This is a discussion thread for the following post:https://blog.xamarin.com/new-xamarin-forms-xaml-intellisense-visual-studio-2017/
This is awesome! Can I ask what changes had to be made on the Xamarin.Forms side? I cant seem to find what commits had the changes? Also did they need to change anything in VS 2017 to have this work or mainly on the X.F side? Basically does this change in VS 2017 only apply to X.F or can any form of XAML now start using the intellisense?
@BradChase.2654 We only had to make some minor changes on the Xamarin.Forms side, like PR #2224..
The only fundamental changes that were really required was to extend the XAML editor for UWP/WPF to support Xamarin.Forms.
@PierceBoggan Very interesting. We are on a custom branch of Forms currently. Do we need to copy the design dlls anywhere after we rebuild them? Is it like the old intellisense where we just have either a Design folder or the same library with *.Design in the name and put it in the nuget build?
@BradChase.2654 It should just work. Let me know if it does not.
@PierceBoggan Hmm, nope it doesnt work for me under the new VS 2017 preview. My local namespaces are fine as usual, but not the Xamarin.Forms ones under the XmlnsDefinition of "http://xamarin.com/schemas/2014/forms" unfortunately. What I did was copy the Xamarin.Forms.Core.Design dll over into all of my nuget folders where Xamarin.Forms.Core.dll existed... Is there something else I need to do?
Again we build our nuget packages ourselves with a modified batch file.
@PierceBoggan So I reset all my VS settings, if I set them to C++ which is what I have always used since switching from Borland I cant even load our solution. If I switch to the C# default settings I can load the solution now in the latest preview. I also rebuilt the nuget package with the Design dlls in the Design folder(Xamarin's default) and still no cigar. Any other ideas on how to get intellisense working?
I also thought, well maybe its because all our XAML is in shared projects, but I tried adding directly and still nothing.
EDIT: Ughh cant load the solution anymore no matter how many times I reset my settings. VS has gone to shit.
@BradChase.2654 We have identified a bug where the new XAML IntelliSense may not work with shared projects. We have fixed this for Preview 4.
@PierceBoggan Thanks much. I managed to get it working on the current release VS 2017. I modified the nuget build for our branch of X.F. I saw a bug was opened in github with the exact same issue, so I am sure it will work after that. Unfortunately I cannot run the preview version of VS 2017 because it locks up trying to load any of our solutions. Not only that but we cant even perform a clean without it locking up. At this point VS 2017 release is working if we dont clean solutions so we just manually delete the bin and obj directories. BUT we do have intellisense, so thats a great start! Thanks much!
EDIT: On a side note, I wanted to check in to see if intellisense will work eventually when you are referencing the project instead of the assembly? On my XAML engine it only works when you reference the assembly AND the project is not in the current solution. The minute the project is removed, intellisense starts working again.
I installed the update to 15.7.1 release and intellisense for XAML property values has stopped working. Tested this with a Xamarin Forms project. I've tried using other editors using Open With but nothing works. I will note that the default editor for a .XAML file was set to "Automatic Editor Selector (XML)" which seems wrong.
I get intellisense for property names (ie VerticalOptions) but not the property value (ie Center or Fill etc).
Also I get the green warning line (forget the name) under FontSize="Large" or any value besides a number. Further, sometimes when compiling i actually get a compile error:
XLS0431 Invalid value for property 'FontSize': 'Large'
A recompile and the compile error goes away along with the green warning. But make a change in the XAML and green warning comes back.
I dont see any intellisense settings for XAML files.
Is there a plan to make it work with Prism?
To have this intellisense we need a "public MainPageViewModel()", but with prism we always have a "public MainPageViewModel(INavigationService navigationService /and many other things/)". So, no Intellisense from ViewModels with Prism.
@PierceBoggan nice job!
The Binding Context intellisense should work for ListViews?
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies