![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Getting ContentPropertyAttribute to work I've got a custom control that has a ContentProperty set to a public read-only collection property. However, when I try to build my app, it tells me: "Cannot set content property 'MyProp' on element 'MyClass'. 'MyProp' has incorrect access level or its assembly does not allow access" My class is defined as such: [ContentProperty("MyProp")] public class MyClass { private ICollection _MyProp; public ICollection MyProp { get {...} } } The documentation for the attribute doesn't mention any specific permissions required, and I don't really see how a public access modifier would be wrong. Anyone use this attribute and know where I'm erring? |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Getting ContentPropertyAttribute to work Problem solved: Replace the interface return value with a class, like List<>. Not sure why that error comes up, though, since it should be a valid construct, as the property instantiates the value. "Keith Patrick" <richard_keith_patrick@nospam.hotmail.com> wrote in message news:Os4TqnoLHHA.140@TK2MSFTNGP04.phx.gbl... > I've got a custom control that has a ContentProperty set to a public > read-only collection property. However, when I try to build my app, it > tells me: > "Cannot set content property 'MyProp' on element 'MyClass'. 'MyProp' has > incorrect access level or its assembly does not allow access" > > My class is defined as such: > [ContentProperty("MyProp")] > public class MyClass { > private ICollection _MyProp; > public ICollection MyProp { get {...} } > } > > The documentation for the attribute doesn't mention any specific > permissions required, and I don't really see how a public access modifier > would be wrong. Anyone use this attribute and know where I'm erring? > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Getting ContentPropertyAttribute to work Problem solved: Replace the interface return value with a class, like List<>. Not sure why that error comes up, though, since it should be a valid construct, as the property instantiates the value. "Keith Patrick" <richard_keith_patrick@nospam.hotmail.com> wrote in message news:Os4TqnoLHHA.140@TK2MSFTNGP04.phx.gbl... > I've got a custom control that has a ContentProperty set to a public > read-only collection property. However, when I try to build my app, it > tells me: > "Cannot set content property 'MyProp' on element 'MyClass'. 'MyProp' has > incorrect access level or its assembly does not allow access" > > My class is defined as such: > [ContentProperty("MyProp")] > public class MyClass { > private ICollection _MyProp; > public ICollection MyProp { get {...} } > } > > The documentation for the attribute doesn't mention any specific > permissions required, and I don't really see how a public access modifier > would be wrong. Anyone use this attribute and know where I'm erring? > |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Still searching for way to get Vista search to work: Why doesn't FilterFilesWithUnknownExtensions registry key work in Vista? | Celegans | Vista General | 11 | 08-31-2007 09:04 AM |
| Some administrator work doesn't work | Rem-8 | Vista General | 4 | 05-19-2007 07:08 AM |
| all cd's don't work, but dvd's still work | Phil | Vista hardware & devices | 2 | 05-18-2007 09:35 AM |
| HP LaserJet 1010 don't work in Vista since Beta2 - Advanced 1384 Printing Support drivers for XP don't work | Alexey | Vista print fax & scan | 2 | 10-18-2006 07:05 PM |
| Will all the programs that work on xp work on vista? | exciter | Vista General | 14 | 10-06-2006 11:40 PM |