Problem with BitmapImage .net c#
-
groupThink
- Posts: 15
- Joined: Mon Apr 02, 2012 4:08 pm
Problem with BitmapImage .net c#
Calling BitmapImage.BeginInit(); causes WPF app to crash when protected, works otherwise. The call occurs in an IValueConverter which returns a BitmapImage from a string.
Re: Problem with BitmapImage .net c#
Hi groupThink,
I've tried the below code from msdn and it works well both in protected and non protected. Tested using Framework 4.0.
Probably, this error is specific to your application. Can you please send a non protected sample to support@enigmaprotector.com for tests?
I've tried the below code from msdn and it works well both in protected and non protected. Tested using Framework 4.0.
Probably, this error is specific to your application. Can you please send a non protected sample to support@enigmaprotector.com for tests?
Code: Select all
// Define a BitmapImage.
Image myImage = new Image();
BitmapImage bi = new BitmapImage();
// Begin initialization.
bi.BeginInit();
// Set properties.
bi.CacheOption = BitmapCacheOption.OnDemand;
bi.CreateOptions = BitmapCreateOptions.DelayCreation;
bi.DecodePixelHeight = 125;
bi.DecodePixelWidth = 125;
bi.Rotation = Rotation.Rotate90;
MessageBox.Show(bi.IsDownloading.ToString());
bi.UriSource = new Uri("smiley.png", UriKind.Relative);
// End initialization.
bi.EndInit();
myImage.Source = bi;
myImage.Stretch = Stretch.None;
myImage.Margin = new Thickness(5);
Re: Problem with BitmapImage .net c#
There was also some problem in version 3.70 for protecting of .net programs. Please upgrade it to 3.80, hope this solves the problem.
-
groupThink
- Posts: 15
- Joined: Mon Apr 02, 2012 4:08 pm
Re: Problem with BitmapImage .net c#
3.8 worked a treat. Thanks so much for the fast and efficient support. 
Re: Problem with BitmapImage .net c#
Glad to help 
