Skip to main content

Microsoft Silverlight

Unanswered Question Model View View Model TOO MANY PROPERTIES!!!!!RSS Feed

(0)

Zachary D.
Zachary D.

Member

Member

77 points

187 Posts

Model View View Model TOO MANY PROPERTIES!!!!!

I have a form with 100 textboxes.

Depending on the circumstances certain textboxes are Read-Only.

Do I really have to databind 100 properties that I create in the viewmodel to each of the IsReadOnly Properties of the textboxes?

Is there a better way?  There must be a better way this is going to take forever...

prujohn
prujohn

Contributor

Contributor

3567 points

703 Posts

Re: Model View View Model TOO MANY PROPERTIES!!!!!

Just throwing out an idea.  Create your own textbox (derive from TextBox) with the properties already bound?

ccoombs
ccoombs

Contributor

Contributor

5122 points

755 Posts

Re: Model View View Model TOO MANY PROPERTIES!!!!!

you could use a datagrid with a custom column, or add the textboxes dynamically via a loop in code.

Zachary D.
Zachary D.

Member

Member

77 points

187 Posts

Re: Model View View Model TOO MANY PROPERTIES!!!!!

 I would still end up with 100 properties in teh viewmodel

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities