开发者

Silverlight expander control breaking intellisense

开发者 https://www.devze.com 2023-01-21 07:35 出处:网络
I am trying to use an expander control on a silverlight application.If I just drop it onto the design surface and rebuild the project the Intellisense for XAML suddenly stops working.If I then just re

I am trying to use an expander control on a silverlight application. If I just drop it onto the design surface and rebuild the project the Intellisense for XAML suddenly stops working. If I then just remove the control from the XAML markup and rebuild it starts working again. I can even leave the namespace. Not sure if I have some sort of old version or if the control I have is somehow broken. I have reinstalled VS with no success in fixing this issue.

xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"

< toolkit:Expander Height="100" Horiz开发者_开发问答ontalAlignment="Left" Margin="32,47,0,0" Name="expander1" VerticalAlignment="Top" Width="150">
            <Grid Height="Auto" HorizontalAlignment="Stretch" Name="grid1" VerticalAlignment="Stretch" Width="Auto" />
        </toolkit:Expander>


Do you have the space in < toolkit:Expander also in your original XAML? Then you must remove that space.


One possible fix is to remove the reference to System.Windows.Controls.Toolkit.dll in your project and add it again. But it only partially brings back intellisense, some of it won't work.

This issue has been logged to microsoft on connect: https://connect.microsoft.com/VisualStudio/feedback/details/605736/silverlight-toolkit-breaks-intellisense?wa=wsignin1.0

No official fix yet.

The only workaround I've found so far to make all intellisense work is to remove the namespace reference in the xaml file to work and add it back before compiling. But yes, I agree it is far from a perfect solution :)

0

精彩评论

暂无评论...
验证码 换一张
取 消