-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed the Design project - Removed the VS2017 project files - Removed .NETCore 3.0 - Removed DotnetProjects namespaces, simplified the namespaces - Removed the Attribute class, since it is the same as StyleItem class - Added DocFX projects for building documentations - Updates to the Nuget package: included Xml-docs, readme etc. - Fixed null exception in the ViewBoxToSizeNoStretch support when using Drawing sources. NOTE: The changes will results in breakings changes in the API, but there is no breaking change in Binary, and any current project using only the controls will work as usual.
- Loading branch information
Showing
96 changed files
with
1,621 additions
and
25,518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
############### | ||
# folder # | ||
############### | ||
/**/DROP/ | ||
/**/TEMP/ | ||
/**/packages/ | ||
/**/bin/ | ||
/**/obj/ | ||
_site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## SVGImage | ||
This is an SVG Image View Control for WPF applications. | ||
|
||
Initially forked from: [SVGImage Control - CodeProject Article](https://www.codeproject.com/Articles/92434/SVGImage-Control) | ||
|
||
Besides the bug fixes, new features are added including the following: | ||
- Mask/Clip support | ||
- Support of styles. | ||
- Simple Animation support. | ||
|
||
## Framework support | ||
The SVGImage control library targets the following frameworks | ||
* .NET Framework, Version 4.0 | ||
* .NET Framework, Version 4.5 | ||
* .NET Framework, Version 4.6 | ||
* .NET Framework, Version 4.7 | ||
* .NET Framework, Version 4.8 | ||
* .NET Core, Version 3.1 | ||
* .NET 6 ~ 7 | ||
|
||
## License | ||
The SVGImage control library is relicensed under [MIT License](https://github.com/dotnetprojects/SVGImage/blob/master/LICENSE), | ||
with permission from the original author. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
############### | ||
# temp file # | ||
############### | ||
*.yml | ||
.manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# SVGImage API Reference | ||
|
||
### [](#namespaces)Namespaces | ||
|
||
#### [SVGImage.SVG](xref:SVGImage.SVG) | ||
The namespace containing the SVG controls. | ||
|
||
#### [SVGImage.SVG.Animation](xref:SVGImage.SVG.Animation) | ||
The SVG animation elements namespace. | ||
|
||
#### [SVGImage.SVG.FileLoaders](xref:SVGImage.SVG.FileLoaders) | ||
A namespace defining interfaces for loading external documents and resources. | ||
|
||
#### [SVGImage.SVG.Filters](xref:SVGImage.SVG.Filters) | ||
A namespace defining some of the SVG filters/ | ||
|
||
#### [SVGImage.SVG.PaintServers](xref:SVGImage.SVG.PaintServers) | ||
The namespace defining SVG paint servers. | ||
|
||
#### [SVGImage.SVG.Shapes](xref:SVGImage.SVG.Shapes) | ||
The namespace defining the geometric and related SVG shapes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
## Introduction | ||
|
||
SVG (Scalable Vector Graphic) is an XML based graphic format. | ||
|
||
This little project started out as a simple `SVG` to `XAML` converter. I looked at some simple SVG files and noticed | ||
the similarity to `XAML` defined graphic, and decided to write a converter. However, I soon realized that SVG is a | ||
very complex format, and at the same time, I found no good reason for converting to `XAML` just to show the image | ||
on the screen, so instead, I started working on the `SVG`, `SVGRender` and the `SVGImage` classes. | ||
|
||
* The `SVG` class is the class that reads and parses the XML file. | ||
* `SVGRender` is the class that creates the WPF Drawing object based on the information from the SVG class. | ||
* `SVGImage` is the image control. The image control can either | ||
- load the image from a filename `SetImage(filename)` | ||
- or by setting the Drawing object through `SetImage(Drawing)`, | ||
which allows multiple controls to share the same drawing instance. | ||
|
||
The control only has a couple of properties, `SizeType` and `ImageSource`. | ||
|
||
* `SizeType` - controls how the image is stretched to fill the control | ||
- `None`: The image is not scaled. The image location is translated so the top left corner of the image bounding box is moved to the top left corner of the image control. | ||
- `ContentToSizeNoStretch`: The image is scaled to fit the control without any stretching. Either X or Y direction will be scaled to fill the entire width or height. | ||
- `ContentToSizeStretch`: The image will be stretched to fill the entire width and height. | ||
- `SizeToContent`: The control will be resized to fit the un-scaled image. If the image is larger than the max size for the control, the control is set to max size and the image is scaled. | ||
- `ViewBoxToSizeNoStretch`: Not the content of the image but its viewbox is scaled to fit the control without any stretching.Either `X` or `Y` direction will be scaled to fill the entire width or height. | ||
|
||
For `None` and `ContentToSizeNoStretch`, the Horizontal/VerticalContentAlignment properties can be used to position the image within the control. | ||
|
||
* `ImageSource` - This property is the same as `SetImage(drawing)`, and is exposed to allow for the source to be set through binding. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- name: Introduction | ||
href: intro.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"metadata": [ | ||
{ | ||
"src": [ | ||
{ | ||
"files": [ | ||
"SVGImage/DotNetProjects.SVGImage.csproj" | ||
], | ||
"src": "../Source/", | ||
"properties": { | ||
"TargetFramework": "netcoreapp3.1" | ||
} | ||
} | ||
], | ||
"dest": "api", | ||
"outputFormat": "mref", | ||
"includePrivateMembers": false, | ||
"disableGitFeatures": false, | ||
"disableDefaultFilter": false, | ||
"noRestore": false, | ||
"namespaceLayout": "flattened", | ||
"memberLayout": "samePage", | ||
"enumSortOrder": "alphabetic", | ||
"allowCompilationErrors": false | ||
} | ||
], | ||
"build": { | ||
"content": [ | ||
{ | ||
"files": [ | ||
"api/**.yml", | ||
"api/index.md" | ||
] | ||
}, | ||
{ | ||
"files": [ | ||
"articles/**.md", | ||
"articles/**/toc.yml", | ||
"toc.yml", | ||
"*.md" | ||
] | ||
} | ||
], | ||
"resource": [ | ||
{ | ||
"files": [ | ||
"images/**" | ||
] | ||
} | ||
], | ||
"globalMetadata": { | ||
"_appName": "SVGImage", | ||
"_appTitle": "SVGImage Documentation", | ||
"_appLogoPath": "images/dotnetprojects.png", | ||
"_appFaviconPath": "images/dotnetprojects.png", | ||
"_enableDiagrams": true, | ||
"_enableSearch": true, | ||
"_appFooter": "<div class=\"d-flex flex-column flex-sm-row justify-content-between pt-1\"><p> © 2010 - 2023 DotNetProjects</p><p>Made with <a href=\"https://dotnet.github.io/docfx\">DocFX</a></p></div>", | ||
"_gitContribute": { | ||
"repo": "https://github.com/dotnetprojects/SVGImage", | ||
"branch": "master" | ||
}, | ||
"_gitUrlPattern": "github" | ||
}, | ||
"output": "_site", | ||
"globalMetadataFiles": [], | ||
"fileMetadataFiles": [], | ||
"template": [ | ||
"default", | ||
"modern", | ||
"template" | ||
], | ||
"postProcessors": [], | ||
"keepFileLink": false, | ||
"disableGitFeatures": false | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## SVGImage | ||
This is an SVG Image View Control for WPF applications. | ||
|
||
Initially forked from: [SVGImage Control - CodeProject Article](https://www.codeproject.com/Articles/92434/SVGImage-Control) | ||
|
||
Besides the bug fixes, new features are added including the following: | ||
- Mask/Clip support | ||
- Support of styles. | ||
- Simple Animation support. | ||
|
||
## Framework support | ||
The SVGImage control library targets the following frameworks | ||
* .NET Framework, Version 4.0 | ||
* .NET Framework, Version 4.5 | ||
* .NET Framework, Version 4.6 | ||
* .NET Framework, Version 4.7 | ||
* .NET Framework, Version 4.8 | ||
* .NET Core, Version 3.1 | ||
|
||
## License | ||
The SVGImage control library is relicensed under [MIT License](https://github.com/dotnetprojects/SVGImage/blob/master/LICENSE), | ||
with permission from the original author. | ||
|
||
## Sample Application | ||
|
||
![](images/sample.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* Checkout https://getbootstrap.com/docs/5.3/customize/color/ for more customization options */ | ||
.navbar-brand #logo { | ||
width: 42px; | ||
height: 36px; | ||
} | ||
|
||
#navbar ul.navbar-nav { | ||
margin-top: -3px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export default { | ||
iconLinks: [ | ||
{ | ||
icon: 'github', | ||
href: 'https://github.com/dotnetprojects/SVGImage', | ||
title: 'GitHub: SVGImage' | ||
}, | ||
{ | ||
icon: 'filetype-svg', | ||
href: 'https://developer.mozilla.org/en-US/docs/Web/SVG', | ||
title: 'SVG: Scalable Vector Graphics' | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- name: Articles | ||
href: articles/ | ||
- name: API Reference | ||
href: api/ | ||
homepage: api/index.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.