Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Inheriting controls in WPF

Reply
 
Old 08-06-2008   #1 (permalink)
Sid (Michele Di Cosmo)


 
 

Inheriting controls in WPF

I'm trying to have something like this in WPF:
Control_A: a control that inherits from GenericControl
GenericControl: an abstract control that inherits from UserControl.

I can not set Control_A to inherit from GenericControl:
I've changed the XAML in this way:

<src:GenericControl
x:Class="Control_A"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:bdWebsiteManagerWPF"
Width="300"
Height="300">
<Grid>
</Grid>
</src:GenericControl>

I've also changed the type of the partial source class in this way:

Partial Public Class Control_A
Inherits GenericControl

But I got this error: "The tag 'GenericControl' does not exist in XML
namespace 'clr-namespace:bdWebsiteManagerWPF'."

So this is not a problem about the fact that GenericControl is
abstract, but a problem in the inheritance.

Thanks in advance.
Sid.

PS) Don't reply to email: that mailbox is not watched.

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
.NET Controls .NET General
Inheriting a password locked computer -- what to do? Vista account administration
VS.NET and WPF controls .NET General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46