dotnetprojects/SVGImage
关于
A SVGImage Control for WPF
设计与媒体可以做什么
- Geometry - Basic shapes, paths/curves/arcs, transforms and groups
- Composition - Luminance/alpha masks, clip paths, patterns, symbol/use and nested viewports
- Paint - Linear/radial gradients, spreading, CSS colors, per-use opacity and color overrides
- Text - Styled spans, text anchoring and glyphs along a textPath
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文SVGImage
SVG, naturally at home in WPF.
A native WPF SVG control and Drawing-based renderer for icons, illustrations and supported animation.
Homepage · Get started · SVG support · Changelog · NuGet

Original examples, rendered with SVGImage. Explore the SVG sources.
What can it render?
| Area | Current source support |
|---|---|
| Geometry | Basic shapes, paths/curves/arcs, transforms and groups |
| Composition | Luminance/alpha masks, clip paths, patterns, symbol/use and nested viewports |
| Paint | Linear/radial gradients, spreading, CSS colors, per-use opacity and color overrides |
| Text | Styled spans, text anchoring and glyphs along a textPath |
| Filters | Turbulence, displacement, flood, offset, merge, composite, color matrices, component transfer, blend, blur, morphology and tile |
| CSS | Author cascade, supported selectors, specificity, variables and transform/opacity keyframes |
| SMIL | Native clocks, transforms, motion paths, supported properties, timing and explicit events |
| WPF | Drawing access, intrinsic button sizing, grayscale and deterministic seeking |
See the support reference for scope and limits. The current source includes unreleased changes; published package availability is recorded in the changelog. The full SVG/resvg specification remains a work in progress.
Get started
Install a published package:
dotnet add package DotNetProjects.SVGImage
Add xmlns:svg="https://github.com/dotnetprojects/SVGImage" to your WPF window, then use:
<svg:SVGImage UriSource="Assets/illustration.svg"
Width="320" Height="240"
UseAnimations="True"
SizeType="ViewBoxToSizeNoStretch" />
Add the SVG as Content and copy it to your output directory. Installation and first steps →
Frameworks
Windows / WPF. Targets: .NET Framework 4.0, 4.5, 4.6, 4.7, 4.8, .NET Core 3.1, and .NET 6, 7, 8 for Windows.
dotnet build Source/SVGImage/DotNetProjects.SVGImage.csproj -p:GeneratePackageOnBuild=false
Use Source/SVGImage.sln with Visual Studio 2022. For unreleased features, reference the current library project or a locally built DLL.
Documentation and change history
- Homepage and native-rendered gallery
- Support reference and ongoing changelog
- Masks, CSS, animation, rendering and filters, grayscale
- Samples and regression checks
Selected verification includes 223 external SVG checks, 14 animation examples and a mask fixture compared against Chromium. Downloaded samples/reference suites remain outside the repository.
Contributing and license
Contributions and SVG reproductions are welcome. See CONTRIBUTING.md; user-visible changes belong in the changelog, which also feeds the website.
MIT licensed, with permission from the original author. Originally forked from the SVGImage Control CodeProject article.
探索相关项目
加载中…