-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite canvas #1958
Merged
azchohfi
merged 71 commits into
CommunityToolkit:master
from
IbraheemOsama:InfiniteCanvas
May 23, 2018
Merged
Infinite canvas #1958
Changes from 3 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
c21f3bb
Adding infinite canvas initial commit
IbraheemOsama 4ba9f47
Merge remote-tracking branch 'refs/remotes/Microsoft/master' into Inf…
IbraheemOsama 6c81f9f
Editing samples.json
IbraheemOsama 7d1984e
Infinite Canvas Integrated and no build errors
IbraheemOsama 75a1f8d
Adding drwabeList
IbraheemOsama ff38584
Adding resize events
IbraheemOsama cf69a6e
Adding erase first step
IbraheemOsama eaafe34
Fixing bounding rect problem
IbraheemOsama 5c04d5d
adding clear all
IbraheemOsama c47e4ff
adding custom text button
IbraheemOsama 32d64ac
addign text box click functionality
IbraheemOsama 743c99c
Text working with inking
IbraheemOsama 919bd55
Fixing textbox issues
IbraheemOsama 914fdbf
Adding extract text basic logic
IbraheemOsama afc9cf4
Infinite canvas finally working with virtualization
IbraheemOsama 55748f8
Adding canvas Text Drawable.
IbraheemOsama 090ecb6
Everything is working start to remove the textbox
IbraheemOsama 414e83f
Removing margin
IbraheemOsama 324550b
Removing text border
IbraheemOsama 9f32997
refactoring
IbraheemOsama 06ebb05
Adding transparent textbox
IbraheemOsama 3b46c14
Text is working fine but in case of mouse only need to handle pan
IbraheemOsama 0001962
Now text is working fine :)
IbraheemOsama 26aa07a
Adding reverse process for text and it is working
IbraheemOsama e65538c
Tring to fix textbox right navigation problem
IbraheemOsama de9ed80
Everything is working after disableing interaction
IbraheemOsama 0a5c040
Adding button bold and italic
IbraheemOsama 4b7fdb0
Hahahaha TextBox With Scroll you loose
IbraheemOsama edb8bb8
Fixing scaling issue
IbraheemOsama c1b5cbe
Ink Drawing matches the canvas
IbraheemOsama 8b19bdc
Mapping between ink and drawing surface is accurate
IbraheemOsama e3face0
Fixing textbox heightlight problem
IbraheemOsama edb8550
Next is Undo and Redo
IbraheemOsama 427a5fd
Refactoring and adding commands
IbraheemOsama 42a22b8
Adding Create Text and Change text Command
IbraheemOsama 3d73f61
Adding the reset of text edit commands
IbraheemOsama d307174
Adding ink do undo
IbraheemOsama 5286edf
Adding clear all command
IbraheemOsama fac5611
Refactoring everything to match the toolkit guidelines
IbraheemOsama 71b9278
Adding import export methods
IbraheemOsama 380639c
Adding export import
IbraheemOsama 73dd3b0
Adding header files
IbraheemOsama 7a3aeb3
Adding header files
IbraheemOsama 27905a3
Merge remote-tracking branch 'refs/remotes/Microsoft/master' into Inf…
IbraheemOsama 0da4475
Fixing missing header agaaaaaaaaaaaaaaaaain
IbraheemOsama 6f6aad0
Fixing headers
IbraheemOsama 765b3b5
Renaming unexecute to undo and adding trim(0)
IbraheemOsama 11bfa1c
Adding hide/show
IbraheemOsama c4d4241
Addign min max zoom
IbraheemOsama 1a6ff40
Adding header file
IbraheemOsama b16b516
handling PR comments
IbraheemOsama d0fba89
Adding icon color and fix textbox scroll and view issues
IbraheemOsama a7949e3
Fixing PR Comments
IbraheemOsama bdc77bd
Fixing last Nikola comment (Hopefully)
IbraheemOsama c5ac903
resolving conflicts
IbraheemOsama d5b73db
addign do redo fixing execption
IbraheemOsama 9209c9e
Adding styles
IbraheemOsama a4ad3f8
Merging from master
IbraheemOsama 5fa9b22
Making color red
IbraheemOsama 34733e9
Fixing PR Comments
IbraheemOsama 27b954c
Fixing theming issue
IbraheemOsama 3ebe1cd
Merge remote-tracking branch 'refs/remotes/Microsoft/master' into Inf…
IbraheemOsama 2e84e1b
Adding number only textbox
IbraheemOsama a16634a
Adding Icon
IbraheemOsama c5074b6
Adding control documenations
IbraheemOsama f57fbd4
Merge branch 'master' into InfiniteCanvas
IbraheemOsama 8a69256
Merge branch 'master' into InfiniteCanvas
azchohfi db3b096
Fixing typo
IbraheemOsama aee31d8
Merging from master
IbraheemOsama 4df09aa
Merge branch 'master' into InfiniteCanvas
nmetulev 7a00d8f
Merge branch 'master' into InfiniteCanvas
azchohfi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file modified
BIN
+2.77 KB
(320%)
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InfiniteCanvas/InfiniteCanvas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
title: InfiniteCanvas XAML Control | ||
author: IbraheemOsama | ||
description: InfiniteCanvas is a canvas that supports Infinite Scrolling, Ink, Text, Format Text, Zoom in/out, Redo, Undo, Export canvas data, Import canvas data. | ||
keywords: windows 10, uwp, windows community toolkit, uwp community toolkit, uwp toolkit, InfiniteCanvas, XAML Control, xaml | ||
--- | ||
|
||
# InfiniteCanvas XAML Control | ||
|
||
The [InfiniteCanvas Control](https://docs.microsoft.com/dotnet/api/microsoft.toolkit.uwp.ui.controls.infinitecanvas) is a canvas that supports Infinite Scrolling, Ink, Text, Format Text, Zoom in/out, Redo, Undo, Export canvas data, Import canvas data. | ||
|
||
## Syntax | ||
|
||
```xaml | ||
<Page ... | ||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"/> | ||
|
||
<controls:InfiniteCanvas Name="canvas"/> | ||
``` | ||
|
||
## Sample Output | ||
|
||
![InfiniteCanvas animation](../resources/images/Controls/InfiniteCanvas.gif) | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| -- | -- | -- | | ||
| CanvasWidth | double | Gets or sets the width of the canvas, default value is the max value 2097152. | | ||
| CanvasHeight | double | Gets or sets the height of the canvas, default value is the max value 2097152. | | ||
| IsToolbarVisible | bool | Gets or sets a value indicating whether the toolbar is visible or not. | | ||
| MaxZoomFactor | double | Gets or sets the MaxZoomFactor for the canvas, range between 1 to 10 and the default value is 4. | | ||
| MinZoomFactor | double | Gets or sets the MinZoomFactor for the canvas, range between .1 to 1 the default value is .25. | | ||
|
||
## Methods | ||
|
||
| Method | Return Type | Description | | ||
| -- | -- | -- | | ||
| Redo() | void | Redo the last action. | | ||
| Undo() | void | Undo the last action. | | ||
| ExportAsJson() | string | Export the InfinitCanvas as json string. | | ||
| ImportFromJson(string json) | void | Import InfiniteCanvas from json string and render the new canvas, this function will empty the Redo/Undo queue. | | ||
|
||
## Events | ||
|
||
### ReRenderCompleted | ||
|
||
This event triggered after each render happended because of any change in the canvas elements. | ||
This event could be used to do the Auto Save functionality. | ||
|
||
## Examples | ||
|
||
The following sample demonstrates how to add Grid Splitter Control | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo - should be InfiniteCanvas control |
||
|
||
```xaml | ||
<Page .... | ||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"> | ||
|
||
<Grid> | ||
<controls:InfiniteCanvas Name="canvas"/> | ||
</Grid> | ||
</Page> | ||
``` | ||
|
||
## Sample Code | ||
|
||
[InfiniteCanvas Sample Page Source](https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/InfiniteCanvas). You can see this in action in [Windows Community Toolkit Sample App](https://www.microsoft.com/store/apps/9NBLGGH4TLCQ). | ||
|
||
## Default Template | ||
|
||
[InfiniteCanvas XAML File](https://github.com/Microsoft/UWPCommunityToolkit/blob/master/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml) is the XAML template used in the toolkit for the default styling. | ||
|
||
## Requirements | ||
|
||
| Device family | Universal, 10.0.14393.0 or higher | | ||
| -- | -- | | ||
| Namespace | Microsoft.Toolkit.Uwp.UI.Controls | | ||
| NuGet package | [Microsoft.Toolkit.Uwp.UI.Controls](https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.UI.Controls/) | | ||
|
||
## API | ||
|
||
* [InfiniteCanvas source code](https://github.com/Microsoft/UWPCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some Properties and Events in this syntax. This look .....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default usage for the canvas is "no properties" that's why it is better this way :)