|
|
|
@ -6,8 +6,15 @@ namespace Avalonia.Windowing |
|
|
|
{ |
|
|
|
public class WindowIcon : IWindowIconImpl |
|
|
|
{ |
|
|
|
private IBitmapImpl _bitmap; |
|
|
|
public WindowIcon(IBitmapImpl bitmap) |
|
|
|
{ |
|
|
|
_bitmap = bitmap; |
|
|
|
} |
|
|
|
|
|
|
|
public void Save(Stream outputStream) |
|
|
|
{ |
|
|
|
_bitmap.Save(outputStream); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -19,17 +26,19 @@ namespace Avalonia.Windowing |
|
|
|
|
|
|
|
public IWindowIconImpl LoadIcon(string fileName) |
|
|
|
{ |
|
|
|
return new WindowIcon(); |
|
|
|
return new WindowIcon( |
|
|
|
AvaloniaLocator.Current.GetService<IPlatformRenderInterface>().LoadBitmap(fileName)); |
|
|
|
} |
|
|
|
|
|
|
|
public IWindowIconImpl LoadIcon(Stream stream) |
|
|
|
{ |
|
|
|
return new WindowIcon(); |
|
|
|
return new WindowIcon( |
|
|
|
AvaloniaLocator.Current.GetService<IPlatformRenderInterface>().LoadBitmap(stream)); |
|
|
|
} |
|
|
|
|
|
|
|
public IWindowIconImpl LoadIcon(IBitmapImpl bitmap) |
|
|
|
{ |
|
|
|
return new WindowIcon(); |
|
|
|
return new WindowIcon(bitmap); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|