Ask a questionAsk a question
 

AnswerImages with a transparent background

  • Thursday, January 29, 2009 3:08 AMdrehnstrom Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I want to be able to set a transparency color when displaying images in a WPF window.  Is there an easy way to do this in XAML? 

    Thanks

Answers

  • Thursday, January 29, 2009 3:25 AMprasad22MVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Select the image on the form

    then Go to Properties

    Select the SolidColorBrush Tab.

    and Decrease the Alpha A Percentage from 100% to any lesser value

    so that it will display the image as transpernt based on percentage value 0% is full transperent image may not be visible.

     

    I hope this will help you :)


    Prasad - www.beautifulmind.blog.co.in
    • Marked As Answer byHua Chen Monday, February 02, 2009 9:27 AM
    • Proposed As Answer byprasad22MVPThursday, January 29, 2009 3:25 AM
    •  
  • Thursday, January 29, 2009 11:01 AMaelij Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

     

    If I understand correctly, you want to make parts of a bitmap transparent using a color key. You can use ColorKeyBitmap from Dwayne Need's library (http://www.codeplex.com/MicrosoftDwayneNeed).

     

    Aelij.

    • Marked As Answer byHua Chen Monday, February 02, 2009 9:27 AM
    •  

All Replies

  • Thursday, January 29, 2009 3:25 AMprasad22MVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Select the image on the form

    then Go to Properties

    Select the SolidColorBrush Tab.

    and Decrease the Alpha A Percentage from 100% to any lesser value

    so that it will display the image as transpernt based on percentage value 0% is full transperent image may not be visible.

     

    I hope this will help you :)


    Prasad - www.beautifulmind.blog.co.in
    • Marked As Answer byHua Chen Monday, February 02, 2009 9:27 AM
    • Proposed As Answer byprasad22MVPThursday, January 29, 2009 3:25 AM
    •  
  • Thursday, January 29, 2009 11:01 AMaelij Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,

     

    If I understand correctly, you want to make parts of a bitmap transparent using a color key. You can use ColorKeyBitmap from Dwayne Need's library (http://www.codeplex.com/MicrosoftDwayneNeed).

     

    Aelij.

    • Marked As Answer byHua Chen Monday, February 02, 2009 9:27 AM
    •