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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:21:40+00:00 2026-06-15T02:21:40+00:00

I have a listbox with attribute ItemsSource={Binding}, and I have placed few text blocks

  • 0

I have a listbox with attribute ItemsSource=”{Binding}”, and I have placed few text blocks in it e-g. status, name, date etc. I am setting it itemsource programmatically like this.

listBox.ItemsSource = SomeController.GetSomeList();

Status field is a boolean field in my class model and I want to display open and close in Status fields rather than showing true and false but i dont find any event where I can do this. We dont have any event like onrowcreated or something like this where I can change the attributes of textblock according to its value.

Thanks Yama, but i have found an easier solution my self 🙂

I set the text block with data which is coming from my model class and describe a loaded event in my CS file.
and In that event I wrote

   if (Boolean.Parse(((TextBlock)sender).Text) == true)
        {
            ((TextBlock)sender).Text = "Opened";
        }
        else
        {
            ((TextBlock)sender).Text = "Closed";
        }

and I can change all of the textblock’s attribute as I want through 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-06-15T02:21:42+00:00Added an answer on June 15, 2026 at 2:21 am

    Thanks Yama, but i have found an easier solution my self 🙂 I set the text block with data which is coming from my model class and describe a loaded event in my CS file. and In that event I wrote

    if (Boolean.Parse(((TextBlock)sender).Text) == true)
    {
    ((TextBlock)sender).Text = “Opened”; } else { ((TextBlock)sender).Text = “Closed”; } and I can change all of the textblock’s attribute as I want through this

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

Sidebar

Related Questions

I have the following constellation in my XAML: <ListBox x:Uid=attributesListBox DataContext={Binding Source={StaticResource EditFeatureWithForeignKeyAttributesViewModel}} ItemsSource={Binding
I have the following DataTemplate in a Listbox <ListBox Grid.Column=1 Grid.Row=2 ItemsSource={Binding People} SelectedItem={Binding
I have a ListBox like this : <ListBox DataContext={Binding UpdateSourceTrigger=PropertyChanged} ItemsSource={Binding UpdateSourceTrigger=PropertyChanged} ListBoxItem.Selected=ListBoxItem_Selected> <ListBox.ItemTemplate>
I have a listbox on a page: <select id=user_list name=user_list size=21 style=width:200px;> <option value=1>User
I have a win form app with a listbox displaying methods (by attribute). I
I have a Style which looks like this: <Style x:Name=SomeListBoxStyle TargetType=ListBox> <Setter Property=Template> <Setter.Value>
I have ListBox called lstProductGroups. On a simple Windows Form, a method called GetGroups
I have a ListBox and I need to repeat the styles to be the
I have a ListBox with multiple selection. And I am doing drag and drop
I have a ListBox with items that fill TextBox es. How do I identify

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.