All Projects → mntone → Svgforxaml

mntone / Svgforxaml

Licence: mit
Draw SVG image with Win2D

Projects that are alternatives of or similar to Svgforxaml

Xamlstyler
Visual Studio extension to help format your XAML source code
Stars: ✭ 553 (+558.33%)
Mutual labels:  uwp, xaml
Xamarin Forms Gtk Movies Sample
The Movie DB Xamarin.Forms Sample
Stars: ✭ 83 (-1.19%)
Mutual labels:  uwp, xaml
Reactiveproperty
ReactiveProperty provides MVVM and asynchronous support features under Reactive Extensions. Target framework is .NET Standard 2.0.
Stars: ✭ 603 (+617.86%)
Mutual labels:  uwp, xaml
Fluent Xaml Theme Editor
The Fluent Design XAML theme editor.
Stars: ✭ 437 (+420.24%)
Mutual labels:  uwp, xaml
Ui For Uwp
This repo contains the source code for Telerik UI for Universal Windows Platform (UWP), which includes 20+ UI controls for developers building UWP applications.
Stars: ✭ 1,077 (+1182.14%)
Mutual labels:  uwp, xaml
Calculator
Windows Calculator: A simple yet powerful calculator that ships with Windows
Stars: ✭ 23,274 (+27607.14%)
Mutual labels:  uwp, xaml
Adaptivecards
A new way for developers to exchange card content in a common and consistent way.
Stars: ✭ 950 (+1030.95%)
Mutual labels:  uwp, xaml
Xamlflair
XamlFlair is an animation library for UWP, WPF, and Uno, built to facilitate Xaml animations using only attached properties.
Stars: ✭ 362 (+330.95%)
Mutual labels:  uwp, xaml
Uwp Styles Library
Just a collection of some cool styles that you can just add on to your next UWP project!
Stars: ✭ 52 (-38.1%)
Mutual labels:  uwp, xaml
Uwp App Launcher Mobile
[Open Source] It's like the iOS and Android Home Screens but for Windows 10 (Phones).
Stars: ✭ 47 (-44.05%)
Mutual labels:  uwp, xaml
Windowscommunitytoolkit
The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building UWP and .NET apps for Windows 10. The toolkit is part of the .NET Foundation.
Stars: ✭ 4,654 (+5440.48%)
Mutual labels:  uwp, xaml
Inthehand.forms
Extras for Xamarin Forms including MediaElement
Stars: ✭ 68 (-19.05%)
Mutual labels:  uwp, xaml
Rapid Xaml Toolkit
Tools to accelerate XAML development within Visual Studio.
Stars: ✭ 427 (+408.33%)
Mutual labels:  uwp, xaml
Uno
Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
Stars: ✭ 6,029 (+7077.38%)
Mutual labels:  uwp, xaml
Microsoft Ui Xaml
Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
Stars: ✭ 4,428 (+5171.43%)
Mutual labels:  uwp, xaml
Xaml Controls Gallery
This app demonstrates the controls available in WinUI and the Fluent Design System.
Stars: ✭ 882 (+950%)
Mutual labels:  uwp, xaml
Sharpvectors
SharpVectors - SVG# Reloaded: SVG DOM and Rendering in C# for the .Net.
Stars: ✭ 315 (+275%)
Mutual labels:  svg, xaml
Ammyui
Ammy language repository
Stars: ✭ 356 (+323.81%)
Mutual labels:  uwp, xaml
Gank.uwp
http://gank.io 第三方客户端UWP版
Stars: ✭ 41 (-51.19%)
Mutual labels:  uwp, xaml
Files
A modern file manager that pushes the boundaries of the platform.
Stars: ✭ 15,198 (+17992.86%)
Mutual labels:  uwp, xaml

Svg for Xaml Library

NuGet Downloads License

Draw images from svg file with Win2D.

app screenshot

Tokyo railmaps

app screenshot

Thanks to railmaps

Requirement

Usage

xaml with binding

Binding content type is SvgDocument.

<svg:SvgImage Content="{Binding ...}" />

Renderer a raster image from svg image

var svg = SvgDocument.Parse(...);
var uri = new Uri("ms-appdata:///local/filename.jpg");
var file = await StorageFile.GetFileFromApplicationUriAsync(uri);
await SvgImageRenderer.RendererImageAsync(file, new SvgImageRendererSettings()
{
	Document = svg,
	Format = SvgImageRendererFileFormat.Jpeg,
	Scaling = 10.0F,
	Quality = 0.8F,
});

Rendering in Win2D ecosystem

var svg = SvgDocument.Parse(...);

var width = 24.0F;
var height = 24.0F;
var scaling = 3.0F;
var device = CanvasDevice.GetSharedDevice();
using (var offScreen = new CanvasRenderTarget(device, width, height, scaling * 96.0F))
using (var renderer = new Win2dRenderer(offScreen, svg))
using (var session = offScreen.CreateDrawingSession())
{
	session.Clear(Colors.Transparent);
	renderer.Renderer(width, height, session); // <- rendering svg content
}

Note

If you build your app for Windows 10 Aniversary Update or later, you should use SVG API on Direct2D.

LICENSE

MIT License

Author

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].