Edit: Rolled back Wills change as it was wrong
I’m experiencing an odd problem with both VS2010 and Blend in design mode.
I have a Pivot control, with 2 PivotItems. Usually, when you click in the section of the XAML where the second pivot is declared, VS will update the designer to show that pivot. Additionally, in Blend, usually you can switch between the PivotItems without any issue.
However, in my current project, I can’t switch between them, in either VS or Blend. Both programs appear to realise I’ve clicked though, as an outline of what I assume is the PivotItem is highlighted to the left of the first PivotItem.
To make things more confusing, I created a new PivotApp project, pasted in the code from my current project, and the PivotItem switching worked fine – in both VS and Blend.
I’ve double checked the file properties of my project and the test project (e.g. Build Action: Page), and they are identical.
Restarting VS doesn’t help either. It seems to be something to do with the actual project. I have tried removing as much as possible from the XAML page to see if a particular element is causing the problem, but no luck. I’ve even tried removing all but the default code in the codebehind file, again with no luck.
Anyone know why this might be occuring? Seems like a bug to me…
Managed to find what the problem was after tearing apart every bit of the project!
When I started, I added the Coding4Fun toolkit (which includes the
Microsoft.Phone.Controls.dllfile) to my project, in a ‘lib’ folder, and added references to them.I therefore had two copies of
Microsoft.Phone.Controls.dllon my system – one in the project, and one in the SDK folder.The reference in the project was to the copy in the project. I then excluded the copy in the project, and when I reopened the solution, the reference changed to the SDK copy, and it started behaving properly again.
I’m guessing there was a conflict somewhere, though if there was I would have thought VS would show a warning/error.