Friday, 8 June 2012

ExpressionTextBox in .NET 4.5

The ExpressionTextBox allows you to databind to an argument on your activity and has, up until 4.5, had an optional OwnerActivity attribute which seemed to be optional. Whilst all activities in the framework used it, some custom activities might have omitted it as it worked in 4.0 without needing to be explicitly defined.

Now with .NET 4.5 this attribute is no longer optional – check out what I get if I forget to add it (the 3rd textbox is the one with the missing attribute, and I’m in a C# project)…

Capture

Not only do you get the horrific “Enter a VB expression” text, which sends a chill down my spine each time I see it, you’ll also find that the textbox is read-only if you omit the OwnerActivity attribute. It’s easy to fix though, the following highlighted XAML is all you need to change…

  <sapv:ExpressionTextBox 
Expression="{Binding ModelItem.Body, Converter={StaticResource conv}}"
OwnerActivity="{Binding ModelItem}" .../>

This change in behaviour might be a problem for anyone upgrading their solutions to 4.5, so hopefully someone will find this post useful.

15 comments:

prathap kumar said...

Interesting Article

Dot Net Training in Chennai

Geetha Devi said...

Nice blog. Best Selenium Training in Chennai |Selenium Training in Chennai |
Android Training in ChennaiBest Manual Testing Training in chennai

Jones Sathya said...

Thanks for the information, Useful and interesting. Learned many new things. Keep going
Best selenium training in chennai | Selenium training in chennai | Best automation training in chennai

Krishna Veni said...

Very nice and interesting article, thanks for sharing your information... keep rocks....
Java Training in chennai | No 1 Java Training in chennai | Best Dot Net Training institute in chennai

srihariparu said...

It's really an innovative article. Keep to sharing the knowledge..
Mat Lab Project Center in Chennai | IEEE Mat Lab Projects in Velachery

Rigid Box said...

Thanks for sharing. this article wonderful website Information provided in this website are very nice.. Again Thanks for this article..

sherin angel said...

Thanks for sharing this valuable information. You have posted good and valuable content. Keep sharing.
Final Year Project Center in Chennai | Final Year Project Center in Velachery

srihariparu said...

I have read your blog..Its really an awesome post with valuable content..keep updating.
No.1 Mobile Computing Project Center in Chennai | Best Mobile Computing Project Center in Velachery

srihariparu said...

Thanks for posting your informative and impressive Blog.
No.1 Image Processing Project Center in Chennai | Best Image Processing Project Center in Velachery

Coimbatore Ooty Taxi said...

Wonderful ! Thanks for Sharing this article keep update this kind of nice articles ..

Ed Sheeran said...

I strongly believe that there will be great opportunities for those who looked into this area, thanks much for sharing this beautiful article...
CompTIA Security+ Certifications Training in Chennai | Best S+ Exams in Taramani

Richard Majece said...

I am sure that information from this source will be helpful for students in any case. Here you can find quite useful advices about getting better grades.

harsha hai said...

Really amazing article with smart and cute content..keep sharing.
Hardware and Networking Certifications Training in Chennai | No.1 Networking Exams in Besant Nagar

navya said...

It is amazing and wonderful to visit your site. Thanks for sharing this information, this is useful to me...
CompTIA Security Plus Certifications Course in Chennai | Best CompTIA Security+ Training in Mandaveli

varma said...

Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.
CompTIA A Plus Certifications Coaching Center in Chennai | No.1 CompTIA Security+ Training in Pallavaram