Click here to Skip to main content
15,890,690 members
Home / Discussions / WPF
   

WPF

 
QuestionNo Resources [SOLVED] Pin
#realJSOP4-May-10 7:43
mve#realJSOP4-May-10 7:43 
AnswerRe: No Resources Pin
Luc Pattyn4-May-10 7:49
sitebuilderLuc Pattyn4-May-10 7:49 
GeneralRe: No Resources Pin
#realJSOP4-May-10 7:51
mve#realJSOP4-May-10 7:51 
GeneralRe: No Resources Pin
Luc Pattyn4-May-10 7:57
sitebuilderLuc Pattyn4-May-10 7:57 
AnswerRe: No Resources Pin
Abhinav S4-May-10 7:50
Abhinav S4-May-10 7:50 
GeneralRe: No Resources Pin
#realJSOP4-May-10 7:52
mve#realJSOP4-May-10 7:52 
QuestionDynamic Image binding Pin
Sunil P V4-May-10 6:22
Sunil P V4-May-10 6:22 
AnswerRe: Dynamic Image binding Pin
Leung Yat Chun5-May-10 11:25
Leung Yat Chun5-May-10 11:25 
Source does not accept Icon and Bitmap object, you have to convert it into BitmapImage.

The code below is a converter to convert Bitmap to BitmapImage, the code below can convert Bitmap to propert BitmapImage.


[System.Runtime.InteropServices.DllImport("gdi32.dll")]
        public static extern bool DeleteObject(IntPtr hObject);
        public static BitmapSource loadBitmap(Bitmap source)
        {
            try
            {
                IntPtr hBitmap = source.GetHbitmap();
                //Memory Leak fixes, for more info : http://social.msdn.microsoft.com/forums/en-US/wpf/thread/edcf2482-b931-4939-9415-15b3515ddac6/
                try
                {
                    return Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty,
                       BitmapSizeOptions.FromEmptyOptions());
                }
                finally
                {
                    DeleteObject(hBitmap);
                }
            }
            catch
            {
                return new BitmapImage();
            }

        }


Regards
Joseph Leung

GeneralRe: Dynamic Image binding Pin
Sunil P V5-May-10 22:21
Sunil P V5-May-10 22:21 
GeneralRe: Dynamic Image binding Pin
Leung Yat Chun5-May-10 22:59
Leung Yat Chun5-May-10 22:59 
GeneralRe: Dynamic Image binding Pin
Sunil P V6-May-10 20:01
Sunil P V6-May-10 20:01 
GeneralRe: Dynamic Image binding Pin
Leung Yat Chun6-May-10 23:16
Leung Yat Chun6-May-10 23:16 
GeneralRe: Dynamic Image binding Pin
Sunil P V7-May-10 5:13
Sunil P V7-May-10 5:13 
AnswerRe: Dynamic Image binding Pin
Abhinav S6-May-10 20:17
Abhinav S6-May-10 20:17 
Questionmultiple big images on canvas in WPF - rendering problems Pin
gruberdominik4-May-10 3:50
gruberdominik4-May-10 3:50 
AnswerRe: multiple big images on canvas in WPF - rendering problems [modified] Pin
Insincere Dave5-May-10 8:52
Insincere Dave5-May-10 8:52 
GeneralRe: multiple big images on canvas in WPF - rendering problems Pin
gruberdominik10-May-10 22:36
gruberdominik10-May-10 22:36 
QuestionHelp Needed Pin
Xerox44-May-10 0:21
professionalXerox44-May-10 0:21 
AnswerRe: Help Needed Pin
Pete O'Hanlon4-May-10 1:23
mvePete O'Hanlon4-May-10 1:23 
Questionrandom image appear Pin
yuripon3-May-10 15:32
yuripon3-May-10 15:32 
AnswerRe: random image appear Pin
Kunal Chowdhury «IN»9-May-10 0:40
professionalKunal Chowdhury «IN»9-May-10 0:40 
QuestionWPF Browser Application Error - System.ArgumentException: Value does not fall within the expected range. Pin
Polymorpher3-May-10 14:38
Polymorpher3-May-10 14:38 
AnswerRe: WPF Browser Application Error - System.ArgumentException: Value does not fall within the expected range. Pin
prabhu_thil23-Nov-10 7:16
prabhu_thil23-Nov-10 7:16 
QuestionWriteableBitmap problem Pin
#realJSOP3-May-10 2:54
mve#realJSOP3-May-10 2:54 
AnswerRe: WriteableBitmap problem Pin
Rama Krishna Vavilala3-May-10 4:34
Rama Krishna Vavilala3-May-10 4:34 

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.