Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7183985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:06:26+00:00 2026-05-28T18:06:26+00:00

initially I had a window with lots of bindings like this one: <TextBox Grid.Row=3

  • 0

initially I had a window with lots of bindings like this one:

<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Path=DatabaseServer}" />

Now I have to add validation to each binding and I end with:

<TextBox Grid.Row="3" Grid.Column="1" >
    <TextBox.Text>
        <Binding Path="DatabaseServer" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
            <Binding.ValidationRules>
                <Utils:NotEmptyStringValidator />
            </Binding.ValidationRules>
        </Binding>
    </TextBox.Text>
</TextBox>

Can this be written with less text? Otherwise I will end with a hard to maintain window.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:06:28+00:00Added an answer on May 28, 2026 at 6:06 pm

    From the Binding Markup Extesnions page on MSDN:

    The following are properties of Binding that cannot be set using the
    Binding markup extension/{Binding} expression form.

    ValidationRules : the property takes a generic collection of
    ValidationRule objects. This could be expressed as a property element
    in a Binding object element, but has no readily available
    attribute-parsing technique for usage in a Binding expression. See
    reference topic for ValidationRules.

    So, no, there is not a more concise markup.

    Unless you want to write your own markup extension?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For this assignment I had to create my own string class. I initially wrote
Ok, initially this was just a joke we had with a friend of mine,
Initially I had written this query using LINQ-to-SQL var result = from w in
I'm trying to keep my hashChange event binding from bubbling. I have this: $(window).bind('hashchange',
I recently wrote a program that used a simple producer/consumer pattern. It initially had
Initially I had a method in our DL that would take in the object
Initially I thought this was going to work, but now I understand it won't
Initially I wanted a checkmark where the text is placed on the left of
I initially designed my system following the s# architecture example outlined in this codeproject
I have a delphi application with multiple forms. Initially I had tried a setup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.