Visual Studio 2017 not auto-completing some XAML tags - xaml

I am currently learning about Xamarin.Forms and XAML using Visual Studio 2017. Intellisense seems to be working for XAML files for the most part, but there is at least one tag it doesn't autocomplete, which is OnPlatform. And when I manually write the tag, it doesn't autocomplete attributes like x:TypeArguments. However, it compiles and runs just fine with the OnPlatform element.
Is it normal that Intellisense does not work for a (seemingly random) tag? Are there certain tags that are not auto-completed on purpose?

Is it normal that Intellisense does not work for a (seemingly random) tag?
YES. Sadly, Intellisense support for XAML is patchy. It has been for as long as it has existed. As far as I can tell it does indeed seem random whether it works or not, like you say. I'm sorry that this probably isn't the answer you were hoping for.
There are some suggestions around getting xaml, Xamarin and Intellisense working together here but your mileage may vary:
https://forums.xamarin.com/discussion/93148/getting-xaml-intellisense-to-work-vs-2017

Related

Missing "Define debug and define trace constant" checkbox in visual studio 2022

I'm missing two checkboxes for defining constants in my properties screen. Am I missing something?
It should look like this
I'm using a Microsoft.NET.Sdk.Web project in net6.0
Somewhere along the way, Visual Studio streamlined these options to what you are seeing instead of what you are expecting to see. Actually, I don't think this is a Visual Studio-specific change, but rather it depends on what kind of project and what SDK you are using - those being:
.NET Framework
.NET (.NET Core)
I am guessing you are coming from one of my other answers, which sparked you to ask this question. In my post, that screenshot is from a .NET Framework project. I should have probably been slightly more specific in my reply to you. In your project, you are clearly using .NET 6 (as you mentioned above). Because of that, your properties menu looks way different. This is the streamlining I am talking about.
So where are your checkboxes for defining DEBUG and TRACE constants? They are gone! However, you are looking right at the control that replaced them - or rather, you are looking at how these controls work now. Essentially, the $(DefineConstants) replaces these checkboxes, and you can specify additional constants in the same textbox, separating each by a semicolon. If you hover over the "Conditional compilation symbols" controls and click the gear icon, you can toggle it to vary by configuration, which I think is more clear and useful to do:
Then, if you wish to add custom constants, simply add them to the configurations. In the below screenshot, I added an ONLY_DEBUG to the Debug configuration, and an ONLY_Release in the Release configuration:
In the code, you can use them as so:
Microsoft Documentation can be found here.

Windows forms not updating vb.net

I'm having to work in a vb.net project and I have to add new textfields and labels to a form. But when I change the layout of the form in Visual Studio the form looks fine, but after compilation and moving to a testserver the form all gets jumbled together and label/textfields are all over the place, and some are missing.
Why does this happens and how can I fix it? I think it could have something to do with form languages but I'm not sure. Since on test server there is a way to change the language from the app between dutch and french.
Was able to fix the the issue by compiling the code in visual studio 2010 instead of 2017. Thought i would give it a try since the application was initially developed in VS 2010 and it worked.

VB control styles change for unknown reason and cannot change back

For some reason while I program in Microsoft Visual Basic 2010 Express OR VS Express for Desktop my controls seem to change style for an unknown reason.
This screenshot is in the DESIGN part of my programming:
And here is when I actually run the program:
I don't understand how it can change like that, I've tried changed properties on all the controls, but they just keep changing to whatever style that is...
I can update with more screenshots if need be.
Thanks
Answer given via a comment:
Using Application.EnableVisualStyles() Fixes the whole thing.
Thanks to #Plutonix for the answer!

Visual Studio 2012 Intellisense in CSS editor suggests strange things

I have RTM version of VS 2012, and it's great - but intellisense in VS11 in CSS editor doesn't suggest parameter info, but ... something else, I'm not quite sure what is that actually, it looks like some sample.
To be clear, this is what I get (start VS11 without solution, FILE -> New -> File, file type Styles Sheet):
And this is what I get in VS10 (and what I'd really like to have in VS11):
This is just a sample with "margin"; I tried resetting preferences, clean install of VS11, etc. It behaves the same way with or without solution.
I suspect the problem is between keyboard and chair, but I didn't find any clue in VS11 preferences, or googling any combination of "intellisense css visual studio 2012", etc.
Thanks,
Robert
That is the correct suggestion!.. It is basically giving you an example of what you can put as a value.
It is very useful for other CSS3 properties where the value is more complex.

Intellisense not working for XAML in VS2012 and only partially in Blend

I'm trying to get RC of Visual Studio 2012 working for XAML files. I can't seem to get any XAML Intellisense and the option within Tools is greyed out.
I've also tried to run the solution using Blend, however I only get Intellisense for custom controls such as telerik then.
When ever I drag controls onto the design surface I get an "Object reference not set to an instance of an object" exception but the control is still added to the surface.
I've read that this was a bug within VS11 and was fixed with in the Visual Studio 2012 RC.
I've created a new Silverlight Application and the intellisense is working so i'm wondering if its an issue with how my projects are set up.
I have all of my Styles within a separate themes project, which is referenced by other all other projects. Within the designer these references show up as errors but when the application runs they are resolved fine.
Would unresolved resources at design time affect Intellisense?
Click "Build -> Clean Solution", then "Build -> Build Solution". ("Rebuild Solution" alone doesn't work.) [Source]
If you have a reference to any of the expression blend dlls for interactions and you are using silverlight5 you will need to update the following dlls:
Microsoft.Expression.Controls.dll
Microsoft.Expression.Effects.dll
Microsoft.Expression.Interactions.dll
System.Windows.Interactivity.dll
Blend + SketchFlow Preview for Microsoft Visual Studio 2012
http://www.microsoft.com/en-us/download/details.aspx?id=30702
Ref Location:
C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\Silverlight\v5.0\Libraries
Exact same problem here, using WPF.
In my case, removing:
<Page.Resources>
<vm:AnyViewModel x:Key="anyViewModel" />
</Page.Resources>
Solve my problem...
One known cause of XAML Intellisense failure is if System.Windows.Controls.Toolkit is one of the project references. I've seen where deleting that reference instantly fixes the problem. The problem is described in the comments of this Connect bug for VS2012 Beta, but it applies to the RC with the July update as well.
I've found that some xaml designers for a control have this issue, where other controls are just fine.
The problem (in my case) seems to be if parameters are null or events call uninitialized singletons. Something the designer gives you a stack trace and other timers renders with no problem.
I've found by changing the back-end code for pages that don't have Intelli-sense to include DesignerProperties always fixes the issue (in my cases).
public Homing()
{
InitializeComponent();
if (DesignerProperties.GetIsInDesignMode(this))
return;
// some other code here that may have uninitialized members
}
t
I'm not sure if I had the same problem, but Intellisense mysteriously stopped working for me within a XAML file. I tried cleaning the build as someone suggested, but that didn't work.
After I restarted Visual Studio 2013, the Intellisense in the XAML page started to work again.