Click here to Skip to main content
15,891,473 members
Home / Discussions / WPF
   

WPF

 
QuestionWhite Board using silverlight and Flash Pin
11229410-Jun-10 23:20
11229410-Jun-10 23:20 
AnswerRe: White Board using silverlight and Flash Pin
Abhinav S12-Jun-10 7:42
Abhinav S12-Jun-10 7:42 
QuestionHow to Enable the browser's back and forward buttons at run time for silverlight application Pin
Ch.Gayatri Subudhi9-Jun-10 18:37
Ch.Gayatri Subudhi9-Jun-10 18:37 
AnswerRe: How to Enable the browser's back and forward buttons at run time for silverlight application Pin
Abhinav S9-Jun-10 18:46
Abhinav S9-Jun-10 18:46 
GeneralRe: How to Enable the browser's back and forward buttons at run time for silverlight application Pin
Ch.Gayatri Subudhi9-Jun-10 22:50
Ch.Gayatri Subudhi9-Jun-10 22:50 
AnswerRe: How to Enable the browser's back and forward buttons at run time for silverlight application Pin
Abhinav S10-Jun-10 0:55
Abhinav S10-Jun-10 0:55 
GeneralRe: How to Enable the browser's back and forward buttons at run time for silverlight application Pin
#realJSOP10-Jun-10 1:31
mve#realJSOP10-Jun-10 1:31 
QuestionConvert Icon to BitmapImage shows black border around image. Pin
DavidCinadr9-Jun-10 9:59
DavidCinadr9-Jun-10 9:59 
I am trying to display an icon from a file on my WPF page. I am successfully able to get the icon. I then convert it to a bitmap using icon.ToBitmap(). I then convert it to a BitmapImage using the following code...
private BitmapImage ConvertIconToBitmapImage(Icon icon)
{
    Bitmap bitmap = icon.ToBitmap();

    MemoryStream ms = new MemoryStream();
    bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
    BitmapImage bImg = new BitmapImage();

    bImg.BeginInit();
    bImg.StreamSource = new MemoryStream(ms.ToArray());
    bImg.CreateOptions = BitmapCreateOptions.None;
    bImg.CacheOption = BitmapCacheOption.Default;
    bImg.EndInit();

    ms.Close();

    return bImg;
}


This also works, BUT there is a black border around the image. How do I get rid of this black border? I read some post that say use a manifest file to enable visual styles. But I can't seem to get that to work. Maybe I'm including the manifest file wrong. I've also read some places to use Application.EnableVisualStyles() but that doesn't work with WPF (I believe). Does anyone have any ideas?

Thanks.
AnswerRe: Convert Icon to BitmapImage shows black border around image. Pin
Pete O'Hanlon9-Jun-10 13:09
mvePete O'Hanlon9-Jun-10 13:09 
AnswerRe: Convert Icon to BitmapImage shows black border around image. Pin
DavidCinadr9-Jun-10 13:16
DavidCinadr9-Jun-10 13:16 
QuestionCombo boxes Pin
Lutosław8-Jun-10 5:15
Lutosław8-Jun-10 5:15 
AnswerRe: Combo boxes Pin
AspDotNetDev8-Jun-10 15:51
protectorAspDotNetDev8-Jun-10 15:51 
AnswerRe: Combo boxes Pin
#realJSOP9-Jun-10 2:56
mve#realJSOP9-Jun-10 2:56 
NewsPack Pin
Lutosław11-Jun-10 13:53
Lutosław11-Jun-10 13:53 
QuestionWeb Service Method Call Fails Pin
#realJSOP7-Jun-10 10:10
mve#realJSOP7-Jun-10 10:10 
AnswerRe: Web Service Method Call Fails Pin
dan!sh 7-Jun-10 15:27
professional dan!sh 7-Jun-10 15:27 
AnswerRe: Web Service Method Call Fails Pin
Pete O'Hanlon7-Jun-10 21:36
mvePete O'Hanlon7-Jun-10 21:36 
GeneralRe: Web Service Method Call Fails Pin
#realJSOP8-Jun-10 0:12
mve#realJSOP8-Jun-10 0:12 
GeneralRe: Web Service Method Call Fails Pin
Pete O'Hanlon8-Jun-10 0:45
mvePete O'Hanlon8-Jun-10 0:45 
GeneralRe: Web Service Method Call Fails Pin
#realJSOP8-Jun-10 3:53
mve#realJSOP8-Jun-10 3:53 
GeneralRe: Web Service Method Call Fails Pin
Pete O'Hanlon8-Jun-10 4:00
mvePete O'Hanlon8-Jun-10 4:00 
GeneralRe: Web Service Method Call Fails Pin
#realJSOP8-Jun-10 4:01
mve#realJSOP8-Jun-10 4:01 
GeneralRe: Web Service Method Call Fails Pin
Pete O'Hanlon8-Jun-10 4:11
mvePete O'Hanlon8-Jun-10 4:11 
GeneralRe: Web Service Method Call Fails Pin
#realJSOP8-Jun-10 4:52
mve#realJSOP8-Jun-10 4:52 
GeneralRe: Web Service Method Call Fails Pin
Pete O'Hanlon8-Jun-10 9:07
mvePete O'Hanlon8-Jun-10 9:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.