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 830483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:03:06+00:00 2026-05-15T04:03:06+00:00

I built a WPF application and manage to get the validation working thanks to

  • 0

I built a WPF application and manage to get the validation working thanks to posts on stackoverflow.The only probblem i’m having is that it’s overriding the theme i’m using.
example the theme makes the textboxes look like a round rectangle but after setting the binding it look like the default textboxes. here is my code :

<Button.Style>
            <Style TargetType="{x:Type Button}">
                <Setter Property="IsEnabled" Value="false" />

                <Style.Triggers>
                <!-- Require the controls to be valid in order to press OK -->
                <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding ElementName=txtEmail, Path=(Validation.HasError)}" Value="false" />

                        </MultiDataTrigger.Conditions>
                        <Setter Property="IsEnabled" Value="true" />
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>
        </Button.Style>

code behind is:

//Form loaded event code
txtEmail.GetBindingExpression(TextBox.TextProperty).UpdateSource();

I’ve tried to look into the theme file but i was quickly lost.i thought i could use that file like a web css file.Now i’ve disabled the data binding because of that.Is there any work around for this? thanks for reading this

  • 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-15T04:03:07+00:00Added an answer on May 15, 2026 at 4:03 am

    Not sure if that’s the root problem, but try adding BasedOn="{StaticResource {x:Type Button}}" to style element.

    Button.Style> 
                <Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}"> 
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a wpf application that is using EF and SQLCE4. Everything works
i've built my first wpf application, nothing fancy, but i wanna make it look
I just built a WPF form that contains a ListBox. The ListBox has bound
I've built an WPF application with visual studio 2008 and created an installer for
We have the beginnings of a modular wpf application built using prism. We want
Well, the problem is as follows: I have a WPF Application built using the
I've been working on a WPF application. Since I design the UI in Expression
I'm trying to write validation rules for my data objects in a WPF application
I have built a WP7.1 application that uses a local database. I used sqlmetal
I'm working with a WPF application tasked with displaying a large amount of bitmap

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.