O'Reilly Forums: Help Cannot Add Enemytemplate - Right Click On Contentcontrol - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help Cannot Add Enemytemplate - Right Click On Contentcontrol Cannot follow WPF learners guide

#1 User is offline   HamsterMan 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 17-February 14

Posted 17 February 2014 - 09:05 AM

Hi Everyone.

I could use some help, if you have a moment.

I am using the WPF Learners guide as I have Windows 7 and Visual Studio Express 2010. I am on page 23, section 3. I am trying to add the enemy template. The instructions says to

"right-click on the ContentControl in the Document Outline window. Choose Edit Template, then choose Create Empty... from the menu. Name it EnemyTemplate"

When I right click, there is nothing. No sub menu nothing. Am i missing something or could you suggest a way around this issue.

Thank you in advance.

#2 User is offline   AndrewStellman 

  • Andrew Stellman
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 811
  • Joined: 08-October 08
  • Gender:Male
  • Location:Brooklyn, NY
  • Interests:Author of: "Head First C#", "Beautiful Teams", "Head First PMP", "Applied Software Project Management"

Posted 18 February 2014 - 05:59 AM

That's right, this feature was only available starting with Visual Studio 2012. See the box on the top right corner of page 22:


The user interface for editing colors in earlier versions of VisualStudio is not as advanced, but you should still be able to set the colors so they look correct. The Document Outline window is also a little more primitive, but it still works. However, there is not an easy way to visually create a template in VisualStudio 2010. The easiest way to do this in the old version of the IDE is to copy the entire <Window.Resources> section (up through the closing </Window.Resources> tag) from the downloadable source code and paste it into your XAMLjust above the opening <Grid> tag. Then you can select theContentControl and use Properties window to set the Templateproperty to EnemyTemplate. Your enemies will already look like evil aliens, so make sure you still read pages 44 and 45.

Andrew Stellman
Author, Head First C#
Building Better Software -- http://www.stellman-greene.com

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users