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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:35:47+00:00 2026-06-13T19:35:47+00:00

I have a ListBox written in xaml : <ListBox Margin=0 x:Name=ListBox_Main Grid.Row=1 VerticalAlignment=Top FontSize=24

  • 0

I have a ListBox written in xaml:

<ListBox Margin="0" x:Name="ListBox_Main" Grid.Row="1" VerticalAlignment="Top" FontSize="24" SelectionChanged="ListBox_Main_SelectionChanged" Foreground="Black">
    <ListBoxItem Content="Item 1" Background="#19000000" />
    <ListBoxItem Content="Item 2" Background="#19000000" />
    <ListBoxItem Content="Item 3" Background="#19000000" />
    <ListBoxItem Content="Item 4" Background="#19000000"/>
    <ListBoxItem Content="Item 5" Background="#19000000"/>
 </ListBox>

We can see the background color is #19000000, can we change the color in C#?

  • 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-13T19:35:48+00:00Added an answer on June 13, 2026 at 7:35 pm

    You can set the background color using a brush:

    var item = ListBox_Main.Items[0] as ListBoxItem ;
    item.Background = new SolidColorBrush(Windows.UI.Color.FromArgb(255, 255, 255, 0));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I have this ListBox written in XAML: <ListBox Margin=0 x:Name=ListBox_Main Grid.Row=1 VerticalAlignment=Top FontSize=24
I have listbox like this: <ListBox Height=589 HorizontalAlignment=Left Name=AllNotesListBox VerticalAlignment=Top Width=460 SelectionChanged=AllNotesListBox_SelectionChanged> <ListBox.ItemTemplate> <DataTemplate>
I have listbox in my wp7 app like this <ListBox Name=lstSelectedNumber Height=50 MaxHeight=120 VerticalAlignment=Top
I have listbox that displays information about list of objects: <ListBox Grid.Column=0 Height=152 Name=CustomersList
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 written following xaml code: <Window x:Class=WpfApplication3.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow Height=200 Width=200> <StackPanel>
i have ListBox on my xaml page called MainListBox. i can get index that
I have listbox and I am placing some labels in it. <ListBox x:Name=lstContacts> <ListBox.ItemTemplate>
MY TASK: I have ListBox and Grid . 1. ListBoxSource and 2. GridDetails (with
Trying to fill the listbox programatically I have written the following code: protected override

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.