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 am currently working on the WPF project which involves creating a touch-screen application
We have a web application that has been built using MySQL / PHP /
I am writing a fairly simple WPF desktop application and under build\configuration manager, release
I'm using the built-in SpellCheck for the WPF RichTextBox and would like to ignore
We built a grant application system for a client. They've now asked for some
I built an application which displays the records from database in the window and
I built a Winform app several months ago that schedules appointments for repair techs.
I am building a WPF application using C# in VS2010. I have a database
I have built a Wpf UserControl Library and it contains a large group of
I think I'm asking for a lecture on the proper application of WPF here

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.