Product Bundles
DevCraft
All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
Web
Mobile
Document Management
Desktop
Reporting
Testing & Mocking
CMS
UI/UX Tools
Debugging
Free Tools
Support and Learning
Productivity and Design Tools
<
telerik:GridViewImageColumn
DataMemberBinding
=
"{Binding OrijinalImage,Converter={StaticResource imgConverter}}"
Header
"Resim"
ImageHeight
"100"
ImageWidth
/>
public
class
ImageConverter : IValueConverter
{
object
IValueConverter.Convert(
value,
Type targetType,
parameter,
System.Globalization.CultureInfo culture)
if
(value !=
null
)
Binary bin = value
as
Binary;
byte
[] bytes = bin.ToArray();
MemoryStream stream =
new
MemoryStream(bytes);
BitmapImage image =
BitmapImage();
image.BeginInit();
image.StreamSource = stream;
image.EndInit();
return
image;
}
;
IValueConverter.ConvertBack(
BitmapImage bitmapImage = value
BitmapImage;
MemoryStream();
[] bytes =
Binary bin =
bitmapImage.StreamSource.Read(bytes, 0, (
int
)bitmapImage.StreamSource.Length);
bin =
Binary(bytes);
bin;