1k0n.WinUI.Extensions
1.0.0
dotnet add package 1k0n.WinUI.Extensions --version 1.0.0
NuGet\Install-Package 1k0n.WinUI.Extensions -Version 1.0.0
<PackageReference Include="1k0n.WinUI.Extensions" Version="1.0.0" />
paket add 1k0n.WinUI.Extensions --version 1.0.0
#r "nuget: 1k0n.WinUI.Extensions, 1.0.0"
// Install 1k0n.WinUI.Extensions as a Cake Addin #addin nuget:?package=1k0n.WinUI.Extensions&version=1.0.0 // Install 1k0n.WinUI.Extensions as a Cake Tool #tool nuget:?package=1k0n.WinUI.Extensions&version=1.0.0
1k0n.WinUI.Extensions
Description
This library provides a set of extensions for WinUI 3.0.
BitmapSourceHelper class
This class provides a set of methods to dynamically create BitmapSource objects.
CreateBitmapSourceFromBytesAsync(byte[]? imageFileBytes)
This method creates a BitmapSource object from a byte array.
var bitmapSource = await BitmapSourceHelper.CreateBitmapSourceFromBytesAsync(bytes);
CreateBitmapSourceFromStreamAsync(Stream imageFileStream)
This method creates a BitmapSource object from a System.IO.Stream.
var bitmapSource = await BitmapSourceHelper.CreateBitmapSourceFromStreamAsync(stream);
MemoryStreamExtensions class
This class provides convience extensions for InMemoryRandomAccessStream.
CopyStreamAsync(this InMemoryRandomAccessStream memoryStream, ulong position, System.IO.Stream stream)
This method copies the content of a System.IO.Stream to an InMemoryRandomAccessStream.
using var memoryStream = new InMemoryRandomAccessStream();
await memoryStream.CopyStreamAsync(0, fileStream);
WriteBytesAsync(this InMemoryRandomAccessStream memoryStream, byte[]? bytes)
This method writes a byte array to an InMemoryRandomAccessStream.
await memoryStream.WriteBytesAsync(bytes);
ToRandomAccessStreamAsync()
This method creates an InMemoryRandomAccessStream from a System.IO.Stream.
using var memoryStream = await stream.ToRandomAccessStreamAsync();
1k0n.WinUI.Extensions is licensed under the MIT License.
copyright (c) 2023 John Meyer Jr.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0-windows10.0.19041 is compatible. net7.0-windows was computed. net8.0-windows was computed. |
-
net6.0-windows10.0.19041
- Microsoft.Windows.SDK.BuildTools (>= 10.0.22621.755)
- Microsoft.WindowsAppSDK (>= 1.2.221116.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 247 | 1/18/2023 |