Skip to main content

Microsoft Silverlight

Answered Question x:FieldModifier fails at runtimeRSS Feed

(0)

MarkTap
MarkTap

Participant

Participant

1442 points

263 Posts

x:FieldModifier fails at runtime

This compiles in SL2B1 and the generated field is made public instead of internal:

         <TextBlock x:Name="tb" Text="Hello" x:FieldModifier="public" />

However, it fails at runtime with:

        "XamlParseException....unknown attribute 'FieldModifier'...."
 

Yi-Lun Luo - MSFT
Yi-Lun L...

All-Star

All-Star

25052 points

2,747 Posts

Answered Question

Re: x:FieldModifier fails at runtime

Hello, not all attributes in x namespace is supported in Silverlight. You should only use the documented ones: x:Class, x:Key, x:Name, x:Null.

shanaolanxing - I'll transfer to the Windows Azure team, and will have limited time to participate in the Silverlight forum. Apologize if I don't answer your questions in time.

codebased
codebased

Participant

Participant

806 points

360 Posts

Re: x:FieldModifier fails at runtime

Hi there,

I' also getting this error but how can I make an object as public?

Cheers,
Ricky

 

"If I've answered your query then please mark it as "Answered".

MishaSt
MishaSt

Member

Member

88 points

22 Posts

Re: Re: x:FieldModifier fails at runtime

I've handy-make public property :) that returns private property.

codebased
codebased

Participant

Participant

806 points

360 Posts

Re: Re: x:FieldModifier fails at runtime

 

same I did , thank you for the reply ;-)

"If I've answered your query then please mark it as "Answered".
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities