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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:43:37+00:00 2026-06-10T05:43:37+00:00

.NET/C#/WPF noob here. I’m trying to give a textbox a border based on a

  • 0

.NET/C#/WPF noob here. I’m trying to give a textbox a border based on a variable I can bind to (variable stores results of validation). My first attempt looked like this:

<Border ... Visibility="{Binding ServerName.IsValid, Converter={StaticResource BoolToVisibility}}">
    <TextBox ... />
</Border>

But this had the undesired side effect of hiding the textbox within it when visibility was hidden. After that I looked at DataTriggers, but it didn’t seem like what I needed. Any ideas on how I can bind the border to that variable?

Thanks!

  • 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-06-10T05:43:38+00:00Added an answer on June 10, 2026 at 5:43 am

    You can layer it:

    <Grid>
        <Border ... /> <!-- Bind as before -->
        <TextBox Margin="5"/> <!-- Margin to not completely hide border below -->
    </Grid>
    

    (You can also overlay the border by switching the order if that is preferable)


    You could use a DataTrigger as well but you would need to change the appearance rather than hiding it completely.

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

Sidebar

Related Questions

I want to preface this by saying I'm a noob with WPF/.net programming. Here
Using WPF .NET 4.0 in VS2010 RTM: I can't create a fullscreen WPF popup.
I have created a wpf vb.net project and am trying to set a simple
i'm developing a WPF (.NET 3.5) application where i need to validate a textbox
I am a noob for the WPF. Hope i can find answer. For example,
I am using a ListBox and a ListBox style from here: http://viblend.com/products/net/wpf/controls/free-wpf-controls.aspx That looks
HI! I'm trying to host a delphi 7 vcl application in a .Net wpf
I have a .NET based (WPF) app which crashes on Windows XP Service Pack
I'm trying to implement a feature in a .Net WPF application to automatically display
I'm using .net WPF geometry classes to graph waveforms. I've been using the matrix

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.