.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

Disable XAML Intellisense in Macro (VS2010 IDE)

Posted By:      Posted Date: August 27, 2010    Points: 0   Category :WPF
 
I'm writing a few macros to insert XAML code I often use into the VS2010 XAML editor. This works OK, but Intellisense is interpreting the code as it's being inserted. This causes syntax errors. Here's an example of the inserted code: <Grid> <Grid.RowDefinitions> <RowDefinition></RowDefinition> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition></ColumnDefinition> </Grid.ColumnDefinitions> </Grid> The inserted code is a bit more complex as it includes properties I commonly use, but this will help illustrate the problem.When the code is inserted, Intellisense completes the definitions. For example, after <Grid> is inserted, Intellisense adds a corresponding </Grid>, which makes the code syntatically incorrect.How can I automatically disable Intellisense before the code is inserted and enable it after (within the macro)? After the code is inserted, I'd like to automatically reformat it.Thanks!


View Complete Post


More Related Resource Links

VS2010 XAML namespace intellisense not working

  
When I type in a namespace in XAML, I'm not getting any intellisense. For example: xmlns:local="" In VS2008 I would get a long intellisense list here. In VS2010 I get nothing. I have tried this on 2 different computers. What am I missing?

VS2010 Premium: intellisense disappeared for tags

  
I have been off work for two weeks (becoming a father for the first time!) and on my return today have suddenly found that Intellisense has disappeared for all <asp:* /> tags in ASPX pages, presumably because of some Microsoft update in the last fortnight. Based on comments in other forums (e.g. here), I have tried the following, with no success:1.  Tools > Options > Text Editor > All languages > check "autolist members" and "parameter information" (they were checked anyway)2.  Start prompt > Run > devenv /resetuserdata (no luck but this did wipe all my settings, costing me yet more time!)I've noticed that this problem only affects existing files: if I create a new ASPX page, it has intellisense enabled.  Therefore a tedious work-around is to keep a dummy file open alongside my real ones and write the code in there first before copying it ... oh dear!My VS2010 version number is 10.0.30319 RTMRel.  I run 64-bit Windows Server 2008 on a Dell lap-top with an AMD Athlon processor.Has anyone else noticed this (and, if so, do they have any other hints as to how to get it back)?Cheers,Ed Graham

XAML Intellisense not working

  

Hello everyone, I am using VSTS2008 SP1, and after resetting my user profile settings of VSTS, Intellisense on my XAML page stopped working. And I'm not sure if this issue is related, I am also getting this error message every time I try to paste something onto the XAML page.

"Value cannot be null. Parameter name: name" with no additional details available provided


Generated MainWindow.xaml crashes VS2010 when you open the designer

  

In my system which is running Windows 7 Enterprise X64 I have a problem viewing some XAML files. At least one of my project XAML files sometimes crashes VS2010 if I open it in the designer or try to view it with Internet Exlorer 8 or Windows Presentation Foundation host. It also happens if i try to display the MainWindow.xaml that is generated by VS 2010.

The contents of MainWindow.xaml are

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
       
    </Grid>
</Window>

 

If I open the debugger when IE8 crashes, the failing stack frame is iefdm2.dll!03992071()

I assume it is some sort installatioin snafu or something but I would hate to have to re-install everything.

Can anybody suggest what the issue might be?


Generated MainWindow.xaml crashes VS2010 when you open the designer

  

In my system which is running Windows 7 Enterprise X64 I have a problem viewing some XAML files. At least one of my project XAML files sometimes crashes VS2010 if I open it in the designer or try to view it with Internet Exlorer 8 or Windows Presentation Foundation host. It also happens if i try to display the MainWindow.xaml that is generated by VS 2010.

The contents of MainWindow.xaml are

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
       
    </Grid>
</Window>

 

If I open the debugger when IE8 crashes, the failing stack frame is iefdm2.dll!03992071()

I assume it is some sort installatioin snafu or something but I would hate to have to re-install everything.

Can anybody suggest what the issue might be?


XAML intellisense stopped working for project

  
We are working on a WPF-based application and have recently lost XAML intellisense on the project. Here's what we've discovered:

  1. XAML intellisense only fails to work in XAML files where we reference a CLR namespace inside the current assembly (using xmlns:s="clr-namespace=Namespace.Name"). 
  2. If we clean the solution, XAML intellisense works for all XAML files no matter what namespace is referenced - even for custom controls
  3. If we then rebuild the solution, intellisense stops working again 
  4. If after building we add an assembly reference pointing to the current assembly to the namespace references (using xmlns:s="clr-namespace=Namespace.Name;assembly=CurrentAssemblyName"), intellisense works again, but building fails (I'm assuming because we're trying to reference an assembly that hasn't been built yet)

Has anyone experienced anything like this before?


VS2010 - copy/paste XAML UTF-16 loses characters

  

I have some (generated) XAML which uses UTF-16 characters (in some of the text); however when I copy/paste the XAML from one VS2010 instance to another the UTF characters get mapped to UTF8 characters; e.g., left and right double quote chars turn into quote chars. This of course is disasterous when the characters occur within an attribute value!

How can I preserve UTF-16 text when pasting into a VS2010 window? (The original file is *loaded* into the VS2010 project and works fine there. I'm trying to isolate a problem by selectively excising parts of the XAML and to do this I use copy/paste into another VS2010 instance containing some XAML boilerplate to try out small segments from the original.)

Bill


Bill Cohagan

VS2008 SP1 + WPF XAML editor breaks IntelliSense (Bug)

  
Hallo.

The scenario is:
1) open just 3 primitive template based XAML files in XAML editor (without showing WPF designer even)
2) close two of opened xaml files
3) Check intelliSense - it wouldn't work untill you restart VS.

If you open 2 XAML files - it works fine, but 3 -XAML - is enought for VS2008SP1 to fall down.

My XAMLs are following:

XAML1:
<UserControl x:Class="AutoTrader.Quotes.CellLotsTemplateControl" 

Why is the WPF/XAML Designer in VS2010 unable to resolve my StaticResource references?

  
I have a WPF 3.5 app that was rendering properly in both the VS2008 Designer and at runtime. Since upgrading to VS2010, the Designer is no longer able to resolve any of my StaticResource references. Everything still renders correctly at runtime.

intellisense .xaml visual studio 2008

  

hi all,

I've just installed Silverlight toolkit for VS 2008. after some difficulties, it works fine no.

But i got a problem concerning editing .xaml files. actually Intellisense (complete word function) doesn't work inside tags.

I don't know how to fix it.

 

I've already cheked the Registry keys as it's adviced in forums as solution, but they are ok

 

please help it's urgent


Please help


Cannot View Xaml Files in VS2010 Professionl

  

I cannot view xaml in vs2010. The files are there, I can build and run.  But I cannot view xaml or designer.

I previously used vs2008 with blend2, and then vs2010 express and blend4 beta.  When I bought and installed vs2010 professional and expression suite 4  my problems began.

I uninstalled all beta and express products before installing.  May I have missed something?


How to solve JavaScript IntelliSense problems in VS2010

  
VS2010 should support all of the VS2008 JavaScript functionalities as shown in Scott Guthrie's VS2008 JavaScript IntelliSense blog .  It includes: 1. Basic type inference 2. IntelliSense from referenced external JavaScript libraries 3. IntelliSense from XML comments for functions, parameters and return types 4. Calling web services using ASP.NET AJAX   Additionally, VS2010 RTM had some improvement, including: 1. IntelliSense when manipulating browser objects 2. Dynamic generated variable IntelliSense 3. Default JavaScript snippets within IntelliSense to help you code faster Scott Guthrie has a brief blog covering some of these.   Due to the dynamic feature of our JavaScript engine, we may run info conflicts between XML commented...(read more)

XAML intellisence not working for one VS2010 project in Solution

  

I've got a WPF solution with 5 projects in it. For some reason...the XAML intellisense quit working and it's driving me nuts. All other intellisense is working just fine (C# for code behinds). I am "not" using any network shares as I saw on other forum posts that this might be the problem. Again...this solution was working fine before. Problem exists where ever I take it XP, W7....Please help!!!

Thanks


Paul Reed

Create And Run Excel Macro At Runtime in C#

  
You've been tasked with writing a Windows Form application using the .NET Framework that interacts with Microsoft Excel. If you are new to working with Excel in .NET and are having trouble learning how to format certain cells or cell ranges, then this little tip will come in handy. Rather than scour the internet hoping to find the correct set of constants or method syntax for formatting your spreadsheet, use the built in tools in Excel to write the familiar VBA code for you. Then, you can paste the VBA code generated by Excel into the sample C# code below and run it dynamically at runtime.

What's new in XAML of .NET 4.0

  
With .NET 4.0 Microsoft will bring up a improved version of XAML. This arcitle shows you the language enhancements they made.
Easy Object References with {x:Reference}

Built-in Types

Generics in XAML with x:TypeArguments

Support for Arbitrary Dictionary Keys

Use of Non-Default Constructors with x:Arguments

Use of Static Factory Methods with x:FactoryMethod

no intellisense, smart tag, extender wizard etc

  

Development Environment:  VS 2008 Pro, IIS 6, asp.net 2.x, sql 2005 server

Installed the version of AJAX Toolkit and Library for the .net 2.0 compatibility (as IIS is still using 2.x)

The problem is as that within the vs 2008 pro, when I select for example a button control...there should be an additional pop-up intellisense indicating...add extender.

to compound this, within the extender control ... the TargetControlID -- should be a drop-down list, indicating which controls are compatible with the extender ... there is no drop-down list.

even if I manually type the control to associate the extender with, this has no effect on the control (such as textbox control) -- as there should be another option appear indicating the association has taken place).

 below is the steps to take (as written by MS) -- but this is what I am not getting:

"If the Button Tasks shortcut menu does not appear, right-click the Button control and then click Show Smart Tag."  -- the smart tag is not appearing

______________________________________________________--
To add an AJAX extender control
Switch to Design view.

If the page does not already contain a ScriptManager control, from the AJAX Extensions tab of the Toolbox, drag one onto the page.

Note:
A ScriptManager c

VS2010 Professional .NET 4.0 Remote Debugging ASP Website Project

  

Trying to remote debug ASP website from VS2010 Pro to Windows Server 2003 machine.  Specifically, trying to debug a Web Service, but breakpoint says, "The breakpoint will not currently be hit. No symbols have been loaded for this document."  This happens for all compiled code though.  I have read this is due to missing PDB files and the work around is to manually copy them, as noted here.  Problem is, I cannot find any PDB files for my project, except referenced libraries, which I can remote debug.

Verified

  • web.config has <compilation debug="true">
  • Debugger is attached to wewp.exe process on remote server
  • Installed VS2010 remote debugger from DVD (as I can remote debug referenced libraries)

This is beyond frustrating.  I migrated my code from VS2008 .Net3.5 to VS2010 .Net4.0 to take advantage of the inherent multithreading framework.  Debugging works when using local host and was stable until deployment to test server.

Thanks in advance,

Anthony


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend