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

  • Home
  • SEARCH
  • 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 8471149
In Process

The Archive Base Latest Questions

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

In my Windows phone7 application I placed a canvas and have set its background

  • 0

In my Windows phone7 application I placed a canvas and have set its background color to some hex color code.Now I am not able get the hex color code value through c# code.I used the below code but it give the color value in system.windows.media.brush.Plz help me with an answer?

clr = Convert.ToString(clr1.Background);
  • 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-10T16:43:02+00:00Added an answer on June 10, 2026 at 4:43 pm

    It seems it returns a Brush and since you’ve set a color it should return a SolidColorBrush. Try this

    var color = ((SolidColorBrush)clr1.Background).Color.ToString();
    

    Example:

    var color = new Color() {R = 0xF0, G = 0x10, B = 0x80};
    var brush = new SolidColorBrush(color);
    var hexcolor = brush.Color.ToString();
    

    hexcolor equals "#00F01080"

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

Sidebar

Related Questions

In my Windows phone7 silverlight Application I have several textblock pairs to display some
In my windows phone7 application I have to Use a control something similar to
In my windows phone7(silverlight) application I have to restrict inserting symbols for a textbox.
in my Windows Phone application I have such structure: <Grid Width=460 Height=77 Margin=-10,0,0,0 Background=#FFD20000
In my Windows phone7 application I load some data from a XML feed. Some
I am working on a Windows phone7 application and need to store some information
I am creating a windows phone application, which need to store some data in
I am developing a windows phone application. The webclient does not fire as I
I have a windows phone application and I need to add a user control
I'm thinking of developing a Windows Phone 7 application using PhoneGap and have a

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.