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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:17:26+00:00 2026-05-19T02:17:26+00:00

I’d like to have the texblock is not visible if the value that generated

  • 0

I’d like to have the texblock is not visible if the value that generated dynamically is equal to zero. I think it can be done solely in XAML using DataTrigger. I am wondering if someone can help to find the proper solution for this.
Thank you in advance.

  • 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-19T02:17:27+00:00Added an answer on May 19, 2026 at 2:17 am

    If you just want to hide the textbox based on the value of that same textbox you could use something like the code below.

    <TextBox Text="0">
        <TextBox.Style>
            <Style>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=Self},Path=Text}" Value="0">
                        <Setter Property="UIElement.Visibility" Value="Hidden" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </TextBox.Style>
    </TextBox>
    

    You can add in a binding if you wanted. Also if you need to check the value of a different textbox to determine if this one should be shown you can alter the binding on the DataTrigger.

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

Sidebar

Related Questions

I have a silverlight listbox that is being used as a search result box.
Let's say we have a XAML code like this: <Style TargetType={x:Type ListBoxItem}> <Setter Property=Template>
I have the following tables: Company {CompanyID, CompanyName} Deal {CompanyID, Value} And I have
I have a TextBlock (acutally a whole bunch of TextBlocks) where I set the
I have a ListBox showing a list of people's names, emails, departments, etc. There
I have a ListView element with a DataTemplate for each ListViewItem defined as follows.
I have managed to reproduce a weird behavior in the auto scrollviewer functionality of
I have the following xaml in my window: <Border Height=100 BorderBrush=Black BorderThickness=2 CornerRadius=10 Background=PaleVioletRed
I'm using a Datagrid from the WPFtoolkit and am running into a problem with
I am developing a simple WPF application without any auto layout. The goal is

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.