|
|
@ -34,16 +34,11 @@ namespace Avalonia.Markup.Xaml.Converters |
|
|
var bitmap = value as IBitmap; |
|
|
var bitmap = value as IBitmap; |
|
|
if (bitmap != null) |
|
|
if (bitmap != null) |
|
|
{ |
|
|
{ |
|
|
return CreateIconFromBitmap(bitmap); |
|
|
return new WindowIcon(bitmap); |
|
|
} |
|
|
} |
|
|
throw new NotSupportedException(); |
|
|
throw new NotSupportedException(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private WindowIcon CreateIconFromBitmap(IBitmap bitmap) |
|
|
|
|
|
{ |
|
|
|
|
|
return new WindowIcon(bitmap); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private WindowIcon CreateIconFromPath(IValueContext context, string path) |
|
|
private WindowIcon CreateIconFromPath(IValueContext context, string path) |
|
|
{ |
|
|
{ |
|
|
var uri = new Uri(path, UriKind.RelativeOrAbsolute); |
|
|
var uri = new Uri(path, UriKind.RelativeOrAbsolute); |
|
|
|