TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sam Hobbs
51
29.3k
2.1m
Setter Property="Template" in Generic.xaml
Mar 6 2012 12:00 AM
I am attempting to create a WPF Custom Control but I am getting the error:
Generic.xaml(6,17): error MC4005: Cannot find the Style Property 'Template' on the type 'WpfCustomControlLibrary2.CustomControl1'.
The problem can be duplicated by simply creating a WPF Custom Conrols Library project then instad of deriving the control from the Control class, derive from Viewbox then build. That is all that is needed to get the error.
The line in Generic.xaml that the error is for is:
<Setter Property="Template">
There is probably an easy solution and I am probably trying to do somethig too advanced for a WPF beginner such as I. If someone can give me a clue of where to look then that will help. I am not sure that Viewbox is the best control to derive from. My custom control will have just one window in it so Viewbox appears to be the best fit.
Reply
Answers (
0
)
How to set the size of ContainerVisual in WPF
What is the Alternate Control for ImageList(Windows Forms) in WPF ??