├── .gitattributes
├── .gitignore
├── .nuget
├── NuGet.Config
├── NuGet.exe
└── NuGet.targets
├── ComicDesigner.Controls
├── ColorPicker
│ ├── ColorPicker.xaml
│ ├── ColorPicker.xaml.cs
│ ├── ColorSpace.cs
│ └── HSV.cs
├── ComicDesigner.Controls.csproj
├── FontPicker
│ └── FontPicker.cs
├── Properties
│ └── AssemblyInfo.cs
├── Themes
│ └── Generic.xaml
└── packages.config
├── ComicDesigner
├── App.xaml
├── App.xaml.cs
├── Assets
│ ├── Logo.scale-100.png
│ ├── Logo.scale-140.png
│ ├── Logo.scale-180.png
│ ├── Logo.scale-80.png
│ ├── SmallLogo.scale-100.png
│ ├── SplashScreen.scale-100.png
│ └── StoreLogo.scale-100.png
├── BundleArtifacts
│ └── neutral.txt
├── ComicDesigner.csproj
├── ComicDesigner_TemporaryKey.pfx
├── DesignSurfaceCommandHandler.cs
├── EditingContext.cs
├── IDesignCommandHandler.cs
├── IEditingContext.cs
├── Images
│ ├── Mario.png
│ └── UI
│ │ ├── BringToFront.png
│ │ ├── SendToBack.png
│ │ └── Undo.png
├── InitializationBootstrapper.cs
├── ItemToUserControlConverter.cs
├── MainPage.xaml
├── MainPage.xaml.cs
├── MainViewModel.cs
├── Model
│ ├── Bubble.cs
│ ├── CanvasItemViewModel.cs
│ ├── Color.cs
│ ├── Document.cs
│ ├── Frame.cs
│ ├── Mario.cs
│ ├── Model.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Shape.cs
│ ├── app.config
│ └── packages.config
├── Package.appxmanifest
├── Properties
│ └── AssemblyInfo.cs
├── PropertiesControl.xaml
├── PropertiesControl.xaml.cs
├── PropertyPages
│ ├── BubbleViewModel.cs
│ ├── ColorToModelColorConverter.cs
│ ├── EqualsConverter.cs
│ ├── FontFamilyToFontNameConverter.cs
│ ├── FrameControl.xaml
│ ├── FrameControl.xaml.cs
│ ├── FrameViewModel.cs
│ ├── ModelColorToSolidColorBrushConverter.cs
│ ├── SpeechBubbleControl.xaml
│ └── SpeechBubbleControl.xaml.cs
├── Themes
│ └── Generic.xaml
├── ToolbarControl.xaml
├── ToolbarControl.xaml.cs
├── ToolbarViewModel.cs
├── Tooling
│ ├── ITool.cs
│ ├── IToolProvider.cs
│ ├── ToolKeyToImageSourceConverter.cs
│ ├── ToolProvider.cs
│ └── Tools
│ │ ├── FrameTool.cs
│ │ ├── Icons
│ │ ├── Frame.png
│ │ ├── Mario.png
│ │ └── SpeechBubble.png
│ │ ├── MarioTool.cs
│ │ └── SpeechBubbleTool.cs
├── UIUtils
│ ├── IRelayCommand.cs
│ ├── RelayCommand.cs
│ ├── SetterValueBindingHelper.cs
│ ├── SizeChange.cs
│ └── TypedTemplateSelector.cs
├── VectorGraphics
│ ├── GeometryData.xaml
│ ├── IconControl.cs
│ └── StringToPathGeometryConverter.cs
├── ViewModelLocator.cs
└── packages.config
├── Glass
├── Glass.Basics
│ ├── Attributes
│ │ ├── LocalizableString.cs
│ │ ├── LocalizedCategoryAttribute.cs
│ │ └── LocalizedDescriptionAttribute.cs
│ ├── Behaviors
│ │ ├── DragDrop
│ │ │ ├── ChildrenRetriever.cs
│ │ │ ├── DragDropBehavior.cs
│ │ │ └── DropModes.cs
│ │ ├── KeepFocusOnErrorBehavior.cs
│ │ ├── RubberBand
│ │ │ ├── ListBoxSelectionBehavior.cs
│ │ │ ├── RubberBandAdorner.cs
│ │ │ ├── RubberBandBehavior.cs
│ │ │ ├── RubberBandSelectionBehavior.cs
│ │ │ └── SelectionMode.cs
│ │ └── SelectionChangeSupervisingBehavior.cs
│ ├── BindingHelper.cs
│ ├── Borders.cs
│ ├── Collections
│ │ └── ObservableCollectionSynchronizer.cs
│ ├── Controls
│ │ ├── BindableGrid
│ │ │ ├── BindableGrid.cs
│ │ │ ├── BoundGridColumnDefinitionCollection.cs
│ │ │ └── BoundGridRowDefinitionCollection.cs
│ │ ├── DottedGrid.cs
│ │ ├── EditableTextBlock
│ │ │ └── EditableTextBlock.cs
│ │ └── FontFamilyPicker
│ │ │ └── FontFamilyPicker.cs
│ ├── Converters
│ │ ├── Designer
│ │ │ ├── Bool2VisibilityConverter.cs
│ │ │ ├── ColorToSolidColorBrushValueConverter.cs
│ │ │ ├── IsGreaterThanConverter.cs
│ │ │ ├── NegConverter.cs
│ │ │ ├── PercentageConverter.cs
│ │ │ ├── ValueConverterGroup.cs
│ │ │ └── Visibility2BoolConverter.cs
│ │ ├── FlaggedEnumConverter.cs
│ │ ├── ImageSourceToImageConverter.cs
│ │ ├── InvertBoolConverter.cs
│ │ ├── IsDifferentConverter.cs
│ │ ├── IsEqualConverter.cs
│ │ ├── IsGreaterThanConverter.cs
│ │ ├── IsLessThanConverter.cs
│ │ ├── IsMatchConverter.cs
│ │ ├── MenuIconConverter.cs
│ │ ├── ObjectTypeConverter.cs
│ │ ├── ValueConverterGroup.cs
│ │ └── VisibilityConverter.cs
│ ├── Core
│ │ └── EventArgs.cs
│ ├── Extensions
│ │ ├── BitmapSourceExtensions.cs
│ │ ├── PanelExtensions.cs
│ │ ├── UIElementExtensions.cs
│ │ └── VisualExtensions.cs
│ ├── Glass.Basics.Wpf.csproj
│ ├── ISelectable.cs
│ ├── Localization
│ │ ├── Strings.Designer.cs
│ │ ├── Strings.es-ES.Designer.cs
│ │ ├── Strings.es-ES.resx
│ │ └── Strings.resx
│ ├── Presentation
│ │ ├── ControlAdorner.cs
│ │ ├── ItemsControlExtensions.cs
│ │ └── Rubberband
│ │ │ ├── RectEventHandler.cs
│ │ │ ├── RubberBandAdorner.cs
│ │ │ ├── RubberBandAttacher.cs
│ │ │ ├── RubberbandAutoSelectionBehavior.cs
│ │ │ ├── RubberbandBehavior.cs
│ │ │ └── RubberbandSelectionBehavior.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── RoutedEventHelper.cs
│ ├── RoutedEventTrigger.cs
│ ├── Styles
│ │ ├── CloseButton.cs
│ │ ├── MaximizeButton.cs
│ │ ├── MinimizeButton.cs
│ │ ├── SystemButton.cs
│ │ ├── Themes
│ │ │ ├── Blue.xaml
│ │ │ └── Brushes.xaml
│ │ ├── WPFBasics.Styles.csproj
│ │ └── app.config
│ ├── Themes
│ │ └── Generic.xaml
│ ├── VisualTreeUtils.cs
│ ├── app.config
│ └── packages.config
├── Glass.Design.Pcl
│ ├── Annotations
│ │ ├── AspMvcActionAttribute.cs
│ │ ├── AspMvcActionSelectorAttribute.cs
│ │ ├── AspMvcAreaAttribute.cs
│ │ ├── AspMvcAreaMasterLocationFormatAttribute.cs
│ │ ├── AspMvcAreaPartialViewLocationFormatAttribute.cs
│ │ ├── AspMvcAreaViewLocationFormatAttribute.cs
│ │ ├── AspMvcControllerAttribute.cs
│ │ ├── AspMvcDisplayTemplateAttribute.cs
│ │ ├── AspMvcEditorTemplateAttribute.cs
│ │ ├── AspMvcMasterAttribute.cs
│ │ ├── AspMvcMasterLocationFormatAttribute.cs
│ │ ├── AspMvcModelTypeAttribute.cs
│ │ ├── AspMvcPartialViewAttribute.cs
│ │ ├── AspMvcPartialViewLocationFormatAttribute.cs
│ │ ├── AspMvcSupressViewErrorAttribute.cs
│ │ ├── AspMvcTemplateAttribute.cs
│ │ ├── AspMvcViewAttribute.cs
│ │ ├── AspMvcViewLocationFormatAttribute.cs
│ │ ├── BaseTypeRequiredAttribute.cs
│ │ ├── CanBeNullAttribute.cs
│ │ ├── CannotApplyEqualityOperatorAttribute.cs
│ │ ├── ContractAnnotationAttribute.cs
│ │ ├── HtmlAttributeValueAttribute.cs
│ │ ├── HtmlElementAttributesAttribute.cs
│ │ ├── ImplicitUseKindFlags.cs
│ │ ├── ImplicitUseTargetFlags.cs
│ │ ├── InstantHandleAttribute.cs
│ │ ├── InvokerParameterNameAttribute.cs
│ │ ├── LocalizationRequiredAttribute.cs
│ │ ├── MeansImplicitUseAttribute.cs
│ │ ├── NotNullAttribute.cs
│ │ ├── NotifyPropertyChangedInvocatorAttribute.cs
│ │ ├── PathReferenceAttribute.cs
│ │ ├── PublicAPIAttribute.cs
│ │ ├── PureAttribute.cs
│ │ ├── RazorSectionAttribute.cs
│ │ ├── StringFormatMethodAttribute.cs
│ │ └── UsedImplicitlyAttribute.cs
│ ├── Canvas
│ │ ├── Aligner.cs
│ │ ├── CanvasItem.cs
│ │ ├── CanvasItemCollection.cs
│ │ ├── CanvasItemRelocator.cs
│ │ ├── CanvasItemResizeInfo.cs
│ │ ├── CanvasItemSelection.cs
│ │ ├── CanvasModelItem.cs
│ │ ├── CanvasVisualItem.cs
│ │ ├── ChildrenPositioning.cs
│ │ ├── ICanvasItem.cs
│ │ └── ICanvasItemContainer.cs
│ ├── ChildrenExpandableCanvasItem.cs
│ ├── Core
│ │ ├── CoordinatePart.cs
│ │ ├── HorizontalAlignment.cs
│ │ ├── ICoordinate.cs
│ │ ├── ICoreTypesFactory.cs
│ │ ├── IInputProvider.cs
│ │ ├── IPoint.cs
│ │ ├── IRect.cs
│ │ ├── ISize.cs
│ │ ├── IUIElementFactory.cs
│ │ ├── IVector.cs
│ │ ├── Point.cs
│ │ ├── Range.cs
│ │ ├── Rect.cs
│ │ ├── ServiceLocator.cs
│ │ ├── Size.cs
│ │ └── VerticalAlignment.cs
│ ├── DesignSurface
│ │ ├── CanvasSelectorExtensions.cs
│ │ ├── DesignAidsProvider.cs
│ │ ├── GroupCommandArgs.cs
│ │ ├── ICanvasSelector.cs
│ │ ├── IDesignSurface.cs
│ │ ├── IDesignerItem.cs
│ │ ├── IMultiSelector.cs
│ │ ├── INamed.cs
│ │ ├── IPositionable.cs
│ │ ├── IResizeThumb.cs
│ │ ├── ISizable.cs
│ │ ├── PlaneOperation.cs
│ │ ├── SizeChangeEventArgs.cs
│ │ └── VisualAids
│ │ │ ├── Drag
│ │ │ ├── DragOperation.cs
│ │ │ └── DragOperationHost.cs
│ │ │ ├── Resize
│ │ │ ├── AspectRatioKeeper.cs
│ │ │ ├── ResizeOperation.cs
│ │ │ └── UIResizeOperationHandleConnector.cs
│ │ │ ├── Selection
│ │ │ ├── SelectionHandler.cs
│ │ │ └── SelectionMode.cs
│ │ │ └── Snapping
│ │ │ ├── CanvasItemSnappingEngine.cs
│ │ │ ├── Edge.cs
│ │ │ ├── EdgeSnappingEngine.cs
│ │ │ ├── GridSnappingEngine.cs
│ │ │ ├── ICanvasItemSnappingEngine.cs
│ │ │ ├── IEdgeSnappingEngine.cs
│ │ │ ├── ISnappingEngine.cs
│ │ │ ├── NoEffectsCanvasItemSnappingEngine.cs
│ │ │ ├── NoEffectsSnappingEngine.cs
│ │ │ ├── Orientation.cs
│ │ │ └── SnappingEngine.cs
│ ├── Extensions.cs
│ ├── Geometrics.cs
│ ├── Glass.Design.Pcl.csproj
│ ├── MathOperations.cs
│ ├── PlatformAbstraction
│ │ ├── FingerManipulationEventArgs.cs
│ │ ├── FingerManipulationEventHandler.cs
│ │ ├── IAdorner.cs
│ │ ├── IControl.cs
│ │ ├── IFrameworkElement.cs
│ │ ├── IUIElement.cs
│ │ ├── IUserInputReceiver.cs
│ │ ├── PointingManipulationEventArgs.cs
│ │ └── PointingManipulationEventHandler.cs
│ ├── PointCollection.cs
│ ├── Primitives
│ │ └── EnumerableExtensions.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ProportionalResizer.cs
│ ├── app.config
│ └── packages.config
├── Glass.Design.Tests
│ ├── CanvasItemGroupTest.cs
│ ├── ExtensionsTest.cs
│ ├── Glass.Design.Tests.csproj
│ ├── LayeredSelectionTest.cs
│ ├── MathTests.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ResizeTests.cs
│ ├── SnappingTest.cs
│ ├── app.config
│ └── packages.config
├── Glass.Design.WinRT
│ ├── CanvasItemControl.cs
│ ├── Core
│ │ ├── PointExtensions.cs
│ │ └── Vector.cs
│ ├── DesignSurface
│ │ ├── DesignSurface.cs
│ │ ├── DesignSurfaceBase.cs
│ │ └── VisualAids
│ │ │ ├── Drag
│ │ │ └── MovingControl.cs
│ │ │ ├── Resize
│ │ │ └── ResizeControl.cs
│ │ │ ├── Selection
│ │ │ ├── Adorner.cs
│ │ │ ├── CanvasItemAdorner.cs
│ │ │ └── SelectionAdorner.cs
│ │ │ └── Snapping
│ │ │ ├── CanvasItemAdorner.cs
│ │ │ └── EdgeAdorner.cs
│ ├── Glass.Design.WinRT.csproj
│ ├── InputDeviceEventHandler.cs
│ ├── InputDeviceEventHandlerArgs.cs
│ ├── PlatformSpecific
│ │ ├── ControlAdapter.cs
│ │ ├── FrameworkElementAdapter.cs
│ │ ├── UIElementAdapter.cs
│ │ ├── WinRTInputProvider.cs
│ │ └── WinRTUIElementFactory.cs
│ ├── Properties
│ │ ├── Annotations.cs
│ │ └── AssemblyInfo.cs
│ ├── Themes
│ │ └── Generic.xaml
│ ├── VisualExtensions.cs
│ ├── WrappingAdorner.cs
│ └── packages.config
├── Glass.Design.Wpf
│ ├── Converters
│ │ └── IThumbCursorConverter.cs
│ ├── Core
│ │ └── PointExtensions.cs
│ ├── DesignSurface
│ │ ├── DesignSurface.cs
│ │ ├── DesignSurfaceBase.cs
│ │ ├── DesignSurfaceCommandHandler.cs
│ │ ├── DesignSurfaceCommands.cs
│ │ └── VisualAids
│ │ │ ├── Drag
│ │ │ └── MovingControl.cs
│ │ │ ├── Resize
│ │ │ └── ResizeControl.cs
│ │ │ ├── Selection
│ │ │ ├── CanvasItemAdorner.cs
│ │ │ └── SelectionAdorner.cs
│ │ │ └── Snapping
│ │ │ └── EdgeAdorner.cs
│ ├── DesignSurfaceItem.cs
│ ├── Glass.Design.Wpf.csproj
│ ├── PlatformSpecific
│ │ ├── ControlAdapter.cs
│ │ ├── FrameworkElementAdapter.cs
│ │ ├── NetCoreInputProvider.cs
│ │ ├── NetCoreUIElementFactory.cs
│ │ └── UIElementAdapter.cs
│ ├── Properties
│ │ ├── Annotations.cs
│ │ └── AssemblyInfo.cs
│ ├── Themes
│ │ └── Generic.xaml
│ ├── Viewing
│ │ └── ViewingSurface.cs
│ ├── WindowsSizeCursorsThumbCursorConverter.cs
│ ├── WrappingAdorner.cs
│ ├── app.config
│ └── packages.config
└── Glass.Design
│ ├── Annotations
│ └── Annotations.cs
│ ├── CanvasItem
│ ├── CanvasItem.cs
│ ├── CanvasItemExtensions.cs
│ ├── CanvasItemGroup.cs
│ ├── CanvasItemResizeInfo.cs
│ └── ICanvasItem.cs
│ ├── ChildrenExpandableCanvasItem.cs
│ ├── Converters
│ └── IThumbCursorConverter.cs
│ ├── DesignSurface
│ ├── DesignOperation.cs
│ ├── IDesignSurface.cs
│ ├── IDesignerItem.cs
│ ├── IMultiSelector.cs
│ ├── IPositionable.cs
│ ├── IResizeThumb.cs
│ ├── ISizable.cs
│ └── VisualAids
│ │ ├── Drag
│ │ ├── DragOperation.cs
│ │ └── DragOperationHost.cs
│ │ ├── Resize
│ │ └── AspectRatioKeeper.cs
│ │ ├── Selection
│ │ ├── SelectionHandler.cs
│ │ └── SelectionMode.cs
│ │ └── Snapping
│ │ ├── CanvasItemSnappingEngine.cs
│ │ ├── EdgeSnappingEngine.cs
│ │ ├── GridSnappingEngine.cs
│ │ ├── ICanvasItemSnappingEngine.cs
│ │ ├── ISnappingEngine.cs
│ │ ├── NoEffectsCanvasItemSnappingEngine.cs
│ │ └── NoEffectsSnappingEngine.cs
│ ├── DragOperation.cs
│ ├── Extensions.cs
│ ├── Geometrics.cs
│ ├── Glass.Design.csproj
│ ├── MathOperations.cs
│ ├── PointCollection.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
│ ├── ProportionalResizer.cs
│ └── Selection
│ └── LayeredSelection.cs
├── README.md
├── SampleModel.Serialization
├── EllipseDto.cs
├── GroupDto.cs
├── LinkDto.cs
├── MarioDto.cs
├── ModelDto.cs
├── ObjectDto.cs
├── Properties
│ └── AssemblyInfo.cs
├── RectangleDto.cs
├── SampleModel.Serialization.csproj
├── ShapeDto.cs
├── SonicDto.cs
├── XmlModelSerializer.cs
├── app.config
└── packages.config
├── SampleModel
├── CanvasDocument.cs
├── CanvasItemViewModel.cs
├── CanvasRectangle.cs
├── Color.cs
├── Ellipse.cs
├── Group.cs
├── Label.cs
├── Link.cs
├── Mario.cs
├── Properties
│ └── AssemblyInfo.cs
├── SampleModel.csproj
├── Shape.cs
├── Sonic.cs
├── app.config
└── packages.config
├── SampleModelNoPCL
├── CanvasRectangle.cs
├── Color.cs
├── Mario.cs
├── Properties
│ └── AssemblyInfo.cs
└── SampleModel.csproj
├── VisualDesigner.sln
└── WPFTestApp
├── App.config
├── App.xaml
├── App.xaml.cs
├── DockingPart.xaml
├── DockingPart.xaml.cs
├── Images
├── Group.png
├── Link.png
├── Mario.png
└── Sonic.png
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── MainWindowViewModel.cs
├── ModelColorToSolidColorBrushConverter.cs
├── MyOperationFormatter.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── WPFTestApp.csproj
└── packages.config
/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/.nuget/NuGet.exe
--------------------------------------------------------------------------------
/ComicDesigner.Controls/ColorPicker/HSV.cs:
--------------------------------------------------------------------------------
1 | namespace ComicDesigner.Controls.ColorPicker
2 | {
3 | public struct HSV
4 | {
5 | public float Hue;
6 | public float Saturation;
7 | public float Value;
8 |
9 | public HSV(float hue, float saturation, float value)
10 | {
11 | Hue = hue;
12 | Saturation = saturation;
13 | Value = value;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ComicDesigner.Controls/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ComicDesigner.Controls")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ComicDesigner.Controls")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/ComicDesigner.Controls/Themes/Generic.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
24 |
25 |
--------------------------------------------------------------------------------
/ComicDesigner.Controls/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ComicDesigner/App.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ComicDesigner/Assets/Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Assets/Logo.scale-100.png
--------------------------------------------------------------------------------
/ComicDesigner/Assets/Logo.scale-140.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Assets/Logo.scale-140.png
--------------------------------------------------------------------------------
/ComicDesigner/Assets/Logo.scale-180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Assets/Logo.scale-180.png
--------------------------------------------------------------------------------
/ComicDesigner/Assets/Logo.scale-80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Assets/Logo.scale-80.png
--------------------------------------------------------------------------------
/ComicDesigner/Assets/SmallLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Assets/SmallLogo.scale-100.png
--------------------------------------------------------------------------------
/ComicDesigner/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/ComicDesigner/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/ComicDesigner/BundleArtifacts/neutral.txt:
--------------------------------------------------------------------------------
1 | MainPackage=C:\src\VisualDesigner\ComicDesigner\bin\Debug\ComicDesigner_1.0.0.0_Bundle\ComicDesigner_1.0.0.0_AnyCPU_Debug.appx
2 | SymbolPackage=C:\src\VisualDesigner\ComicDesigner\AppPackages\ComicDesigner_1.0.0.0_Debug_Test\ComicDesigner_1.0.0.0_AnyCPU_Debug.appxsym
3 | ResourcePack=C:\src\VisualDesigner\ComicDesigner\bin\Debug\ComicDesigner_1.0.0.0_Bundle\ComicDesigner_1.0.0.0_scale-140.appx
4 | ResourcePack=C:\src\VisualDesigner\ComicDesigner\bin\Debug\ComicDesigner_1.0.0.0_Bundle\ComicDesigner_1.0.0.0_scale-180.appx
5 |
--------------------------------------------------------------------------------
/ComicDesigner/ComicDesigner_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/ComicDesigner_TemporaryKey.pfx
--------------------------------------------------------------------------------
/ComicDesigner/EditingContext.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Glass.Design.Pcl.Annotations;
3 | using Glass.Design.Pcl.Canvas;
4 | using Model;
5 | using StyleMVVM.DependencyInjection;
6 |
7 | namespace ComicDesigner
8 | {
9 | [Singleton]
10 | [Export(typeof(IEditingContext))]
11 | public class EditingContext : IEditingContext
12 | {
13 | [ImportConstructor]
14 | public EditingContext()
15 | {
16 | SelectedItems = new CanvasItemCollection();
17 | }
18 | [NotNull]
19 | public Document Document { get; set; }
20 |
21 | public double SurfaceWidth { get; set; }
22 | public double SurfaceHeight { get; set; }
23 | public CanvasItemCollection SelectedItems { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/ComicDesigner/IDesignCommandHandler.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 | using ComicDesigner.UIUtils;
3 |
4 | namespace ComicDesigner
5 | {
6 |
7 | public interface IDesignCommandHandler
8 | {
9 | IEditingContext EditingContext { get; }
10 | RelayCommand UndoCommand { get; }
11 | RelayCommand RedoCommand { get; }
12 | RelayCommand LoadItemsCommand { get; }
13 | RelayCommand SendToBackCommand { get; }
14 | RelayCommand BringToFrontCommand { get; }
15 | }
16 | }
--------------------------------------------------------------------------------
/ComicDesigner/IEditingContext.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Glass.Design.Pcl.Canvas;
3 | using Model;
4 |
5 | namespace ComicDesigner
6 | {
7 | public interface IEditingContext
8 | {
9 | Document Document { get; set; }
10 | double SurfaceWidth { get; set; }
11 | double SurfaceHeight { get; set; }
12 | CanvasItemCollection SelectedItems { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/ComicDesigner/Images/Mario.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Images/Mario.png
--------------------------------------------------------------------------------
/ComicDesigner/Images/UI/BringToFront.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Images/UI/BringToFront.png
--------------------------------------------------------------------------------
/ComicDesigner/Images/UI/SendToBack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Images/UI/SendToBack.png
--------------------------------------------------------------------------------
/ComicDesigner/Images/UI/Undo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Images/UI/Undo.png
--------------------------------------------------------------------------------
/ComicDesigner/ItemToUserControlConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml.Controls;
3 | using Windows.UI.Xaml.Data;
4 | using ComicDesigner.PropertyPages;
5 | using Model;
6 |
7 | namespace ComicDesigner
8 | {
9 | public class ItemToUserControlConverter : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, string language)
12 | {
13 | if (value is Bubble)
14 | {
15 | return new SpeechBubbleControl();
16 | }
17 | if (value is Model.Frame)
18 | {
19 | return new FrameControl();
20 | }
21 |
22 | return new ContentControl();
23 | }
24 |
25 | public object ConvertBack(object value, Type targetType, object parameter, string language)
26 | {
27 | throw new NotSupportedException();
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/ComicDesigner/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 |
3 | // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
4 |
5 | namespace ComicDesigner
6 | {
7 | ///
8 | /// An empty page that can be used on its own or navigated to within a Frame.
9 | ///
10 | public sealed partial class MainPage : Page
11 | {
12 | public MainPage()
13 | {
14 | this.InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/ComicDesigner/Model/Bubble.cs:
--------------------------------------------------------------------------------
1 | using PostSharp.Patterns.Model;
2 |
3 | namespace Model
4 | {
5 | public class Bubble : Shape
6 | {
7 | public string Text { get; set; }
8 |
9 | public Color TextColor { get; set; }
10 |
11 | public double FontSize { get; set; }
12 | public string FontName { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/ComicDesigner/Model/CanvasItemViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using Glass.Design.Pcl.Canvas;
3 |
4 | namespace Model
5 | {
6 | public class CanvasItemViewModel : CanvasModelItem
7 | {
8 | private static int nextId;
9 | private readonly int id = Interlocked.Increment(ref nextId);
10 |
11 | public CanvasItemViewModel()
12 | {
13 | this.Name = this.GetType().Name + id;
14 | }
15 |
16 | public string Name { get; set; }
17 |
18 | public override string ToString()
19 | {
20 | // For better debugging.
21 | return string.Format("{0} #{5}, Left={1}, Top={2}, Width={3}, Height={4}", this.GetType().Name, this.Left,
22 | this.Top, this.Width, this.Height, this.id);
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/ComicDesigner/Model/Color.cs:
--------------------------------------------------------------------------------
1 | namespace Model
2 | {
3 | public struct Color
4 | {
5 | private readonly byte r;
6 | private readonly byte g;
7 | private readonly byte b;
8 | private readonly byte a;
9 |
10 | public Color(byte alpha, byte r, byte g, byte b)
11 | {
12 | this.a = alpha;
13 | this.r = r;
14 | this.g = g;
15 | this.b = b;
16 | }
17 |
18 | public Color(byte r, byte g, byte b) : this(255, r, g, b)
19 | {
20 |
21 | }
22 |
23 | public byte R
24 | {
25 | get { return r; }
26 | }
27 |
28 | public byte G
29 | {
30 | get { return g; }
31 |
32 | }
33 |
34 | public byte B
35 | {
36 | get { return b; }
37 | }
38 |
39 | public byte A
40 | {
41 | get { return a; }
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/ComicDesigner/Model/Document.cs:
--------------------------------------------------------------------------------
1 | using Glass.Design.Pcl.Canvas;
2 | using PostSharp.Patterns.Model;
3 | using PostSharp.Patterns.Recording;
4 |
5 | namespace Model
6 | {
7 | [Recordable]
8 | public class Document : ICanvasItemContainer
9 | {
10 | public Document()
11 | {
12 | this.Children = new CanvasItemCollection();
13 | }
14 |
15 | [Child]
16 | public CanvasItemCollection Children { get; set; }
17 |
18 |
19 | }
20 | }
--------------------------------------------------------------------------------
/ComicDesigner/Model/Frame.cs:
--------------------------------------------------------------------------------
1 | using PostSharp.Patterns.Model;
2 |
3 | namespace Model
4 | {
5 | public class Frame : Shape
6 | {
7 |
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/ComicDesigner/Model/Mario.cs:
--------------------------------------------------------------------------------
1 | namespace Model
2 | {
3 | public class Mario : CanvasItemViewModel
4 | {
5 |
6 | }
7 | }
--------------------------------------------------------------------------------
/ComicDesigner/Model/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Resources;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Model")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("Model")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: NeutralResourcesLanguage("en")]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/ComicDesigner/Model/Shape.cs:
--------------------------------------------------------------------------------
1 | using PostSharp.Patterns.Model;
2 |
3 | namespace Model
4 | {
5 | public class Shape : CanvasItemViewModel
6 | {
7 | public Color Background { get; set; }
8 | public Color Stroke { get; set; }
9 |
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/ComicDesigner/Model/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ComicDesigner/Model/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/ComicDesigner/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ComicDesigner
6 | JoséManuel
7 | Assets\StoreLogo.png
8 |
9 |
10 | 6.3.0
11 | 6.3.0
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ComicDesigner/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("ComicDesigner")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("ComicDesigner")]
12 | [assembly: AssemblyCopyright("Copyright © 2014")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Version information for an assembly consists of the following four values:
17 | //
18 | // Major Version
19 | // Minor Version
20 | // Build Number
21 | // Revision
22 | //
23 | // You can specify all the values or you can default the Build and Revision Numbers
24 | // by using the '*' as shown below:
25 | // [assembly: AssemblyVersion("1.0.*")]
26 | [assembly: AssemblyVersion("1.0.0.0")]
27 | [assembly: AssemblyFileVersion("1.0.0.0")]
28 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/ComicDesigner/PropertiesControl.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/ComicDesigner/PropertiesControl.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml;
3 | using Glass.Design.Pcl.Canvas;
4 |
5 | namespace ComicDesigner
6 | {
7 | public sealed partial class PropertiesControl
8 | {
9 | public PropertiesControl()
10 | {
11 | this.InitializeComponent();
12 | }
13 |
14 | #region SelectedItem
15 | public static readonly DependencyProperty SelectedItemProperty =
16 | DependencyProperty.Register("SelectedItem", typeof(object), typeof(PropertiesControl),
17 | new PropertyMetadata(null, PropertyChangedCallback));
18 |
19 | private static void PropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
20 | {
21 |
22 | }
23 |
24 | public bool SelectedItem
25 | {
26 | get { return (bool)GetValue(SelectedItemProperty); }
27 | set { SetValue(SelectedItemProperty, value); }
28 | }
29 |
30 | #endregion
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/ComicDesigner/PropertyPages/ColorToModelColorConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI;
3 | using Windows.UI.Xaml.Data;
4 |
5 | namespace ComicDesigner.PropertyPages
6 | {
7 | public class ColorToModelColorConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, string culture)
10 | {
11 | if (value != null)
12 | {
13 | var modelColor = (Model.Color) value;
14 | var color = Color.FromArgb(modelColor.A, modelColor.R, modelColor.G, modelColor.B);
15 | return color;
16 | }
17 | else
18 | {
19 | return new Color();
20 | }
21 | }
22 |
23 | public object ConvertBack(object value, Type targetType, object parameter, string culture)
24 | {
25 | var color = (Color) value;
26 | var modelColor = new Model.Color(color.A, color.R, color.G, color.B);
27 | return modelColor;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/ComicDesigner/PropertyPages/EqualsConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml.Data;
3 |
4 | namespace ComicDesigner.PropertyPages
5 | {
6 | public class EqualsConverter : IValueConverter
7 | {
8 | public object Convert(object value, Type targetType, object parameter, string language)
9 | {
10 | return Equals(value, parameter);
11 | }
12 |
13 | public object ConvertBack(object value, Type targetType, object parameter, string language)
14 | {
15 | throw new NotSupportedException();
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/ComicDesigner/PropertyPages/FontFamilyToFontNameConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI.Xaml.Data;
3 | using Windows.UI.Xaml.Media;
4 |
5 | namespace ComicDesigner.PropertyPages
6 | {
7 | public class FontFamilyToFontNameConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, string language)
10 | {
11 | var fontName = value as string;
12 | if (!string.IsNullOrEmpty( fontName ))
13 | {
14 | return new FontFamily(fontName);
15 | }
16 |
17 | return null;
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, string language)
21 | {
22 |
23 |
24 | var fontFamily = value as FontFamily;
25 | if (fontFamily != null)
26 | {
27 | return fontFamily.Source;
28 | }
29 |
30 | return null;
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/ComicDesigner/PropertyPages/FrameControl.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace ComicDesigner.PropertyPages
2 | {
3 | public sealed partial class FrameControl
4 | {
5 | public FrameControl()
6 | {
7 | this.InitializeComponent();
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/ComicDesigner/PropertyPages/ModelColorToSolidColorBrushConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Windows.UI;
3 | using Windows.UI.Xaml.Data;
4 | using Windows.UI.Xaml.Media;
5 | using AutoMapper;
6 |
7 | namespace ComicDesigner.PropertyPages
8 | {
9 | public class ModelColorToSolidColorBrushConverter : IValueConverter
10 | {
11 | public object Convert(object value, Type targetType, object parameter, string culture)
12 | {
13 | if (value != null)
14 | {
15 |
16 | var modelColor = (Model.Color)value;
17 | var color = Color.FromArgb(modelColor.A, modelColor.R, modelColor.G, modelColor.B);
18 | var solidColorBrush = new SolidColorBrush(color);
19 | return solidColorBrush;
20 | }
21 | return new SolidColorBrush();
22 | }
23 |
24 | public object ConvertBack(object value, Type targetType, object parameter, string culture)
25 | {
26 | var solidColorBrush = (SolidColorBrush)value;
27 | var colorFromBrush = solidColorBrush.Color;
28 | var color = new Model.Color(colorFromBrush.A, colorFromBrush.R, colorFromBrush.G, colorFromBrush.B);
29 | return color;
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/ComicDesigner/PropertyPages/SpeechBubbleControl.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 |
3 | // The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
4 |
5 | namespace ComicDesigner.PropertyPages
6 | {
7 | public sealed partial class SpeechBubbleControl
8 | {
9 | public SpeechBubbleControl()
10 | {
11 | this.InitializeComponent();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/ComicDesigner/Themes/Generic.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ComicDesigner/ToolbarControl.xaml.cs:
--------------------------------------------------------------------------------
1 | using Windows.UI.Xaml.Controls;
2 |
3 | // The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
4 |
5 | namespace ComicDesigner
6 | {
7 | public sealed partial class ToolbarControl : UserControl
8 | {
9 | public ToolbarControl()
10 | {
11 | this.InitializeComponent();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/ITool.cs:
--------------------------------------------------------------------------------
1 | using Model;
2 | using PostSharp.Patterns.Recording;
3 |
4 | namespace ComicDesigner.Tooling
5 | {
6 | public interface ITool
7 | {
8 | string Name { get; set; }
9 | string IconKey { get; set; }
10 | CanvasItemViewModel CreateItem(IEditingContext editingContext);
11 | }
12 |
13 | public abstract class Tool : ITool
14 | {
15 | public string Name { get; set; }
16 | public abstract CanvasItemViewModel CreateItem();
17 |
18 | public string IconKey { get; set; }
19 | public CanvasItemViewModel CreateItem(IEditingContext editingContext)
20 | {
21 |
22 | var items = editingContext.Document.Children;
23 | var canvasItemViewModel = CreateItem();
24 |
25 | if ( this.InsertOrder == InsertOrder.ToEnd )
26 | {
27 | items.Add( canvasItemViewModel );
28 | }
29 | else
30 | {
31 | items.Insert( 0, canvasItemViewModel );
32 | }
33 |
34 | return canvasItemViewModel;
35 |
36 | }
37 |
38 | public InsertOrder InsertOrder { get; set; }
39 | }
40 |
41 | public enum InsertOrder
42 | {
43 | ToEnd = 0,
44 | ToBeginning,
45 | }
46 | }
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/IToolProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace ComicDesigner.Tooling
4 | {
5 | public interface IToolProvider
6 | {
7 | IEnumerable Tools { get; }
8 | }
9 | }
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/ToolKeyToImageSourceConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Windows.UI.Xaml.Data;
8 | using Windows.UI.Xaml.Media.Imaging;
9 |
10 | namespace ComicDesigner.Tooling
11 | {
12 | public class ToolKeyToImageSourceConverter : IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, string language)
15 | {
16 | Debug.Assert(value is string);
17 |
18 | var iconKey = (string) value;
19 | var path = @"Tooling/Tools/Icons/";
20 | var uriString = string.Format("ms-appx:/{0}{1}.png", path, iconKey);
21 |
22 | var uriSource = new Uri(uriString);
23 | var bitmapImage = new BitmapImage(uriSource);
24 |
25 | return bitmapImage;
26 | }
27 |
28 | public object ConvertBack(object value, Type targetType, object parameter, string language)
29 | {
30 | throw new NotSupportedException();
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/ToolProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using StyleMVVM.DependencyInjection;
3 |
4 | namespace ComicDesigner.Tooling
5 | {
6 | [Export(typeof(IToolProvider))]
7 | public partial class ToolProvider : IToolProvider
8 | {
9 | private IEnumerable tools;
10 |
11 | [ImportConstructor]
12 | public ToolProvider(IEnumerable tools)
13 | {
14 | this.tools = tools;
15 | }
16 |
17 | public IEnumerable Tools
18 | {
19 | get { return tools; }
20 | private set { tools = value; }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/Tools/FrameTool.cs:
--------------------------------------------------------------------------------
1 | using Glass.Design.WinRT.Annotations;
2 | using Model;
3 | using StyleMVVM.DependencyInjection;
4 |
5 | namespace ComicDesigner.Tooling.Tools
6 | {
7 | [Export(typeof(ITool)), UsedImplicitly]
8 | public class FrameTool : Tool
9 | {
10 | public FrameTool()
11 | {
12 | Name = "Panel";
13 | IconKey = "Frame";
14 | InsertOrder = InsertOrder.ToBeginning;
15 | }
16 |
17 | public override CanvasItemViewModel CreateItem()
18 | {
19 | return new Frame
20 | {
21 | Width = 400,
22 | Height = 300,
23 | Background = new Color(255, 255, 255, 255),
24 | Stroke = new Color(255, 0, 0, 0),
25 | };
26 | }
27 |
28 | }
29 | }
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/Tools/Icons/Frame.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Tooling/Tools/Icons/Frame.png
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/Tools/Icons/Mario.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Tooling/Tools/Icons/Mario.png
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/Tools/Icons/SpeechBubble.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SuperJMN/VisualDesigner/657f1f3f1ea21d08cedfd6a029a56f8e24fc0602/ComicDesigner/Tooling/Tools/Icons/SpeechBubble.png
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/Tools/MarioTool.cs:
--------------------------------------------------------------------------------
1 | using Glass.Design.WinRT.Annotations;
2 | using Model;
3 | using StyleMVVM.DependencyInjection;
4 |
5 | namespace ComicDesigner.Tooling.Tools
6 | {
7 | [Export(typeof(ITool)), UsedImplicitly]
8 | public class MarioTool : Tool
9 | {
10 | public MarioTool()
11 | {
12 | Name = "Mario";
13 | IconKey = "Mario";
14 | }
15 |
16 | public override CanvasItemViewModel CreateItem()
17 | {
18 | return new Mario
19 | {
20 | Width = 170,
21 | Height = 200,
22 | };
23 | }
24 |
25 | }
26 | }
--------------------------------------------------------------------------------
/ComicDesigner/Tooling/Tools/SpeechBubbleTool.cs:
--------------------------------------------------------------------------------
1 | using Model;
2 | using StyleMVVM.DependencyInjection;
3 |
4 | namespace ComicDesigner.Tooling.Tools
5 | {
6 | [Export(typeof(ITool))]
7 | public class SpeechBubbleTool : Tool
8 | {
9 | public SpeechBubbleTool()
10 | {
11 | Name = "Speech Bubble";
12 | IconKey = "SpeechBubble";
13 | }
14 | public override CanvasItemViewModel CreateItem()
15 | {
16 | return new Bubble
17 | {
18 | Width = 300,
19 | Height = 200,
20 | Background = new Color(255, 0, 200, 255),
21 | Text = "Sample Text",
22 | TextColor = new Color(255, 0, 0, 0),
23 | FontSize = 16D,
24 | };
25 |
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/ComicDesigner/UIUtils/IRelayCommand.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Input;
2 |
3 | namespace ComicDesigner.UIUtils
4 | {
5 | ///
6 | /// Support for commanding.
7 | ///
8 | public interface IRelayCommand : ICommand
9 | {
10 | ///
11 | /// Raises the can execute changed.
12 | ///
13 | void RaiseCanExecuteChanged();
14 |
15 | ///
16 | /// Determines whether this instance can execute the specified parameter.
17 | ///
18 | /// The parameter.
19 | ///
20 | /// true if this instance can execute the specified parameter; otherwise, false.
21 | ///
22 | bool CanExecute(object parameter);
23 |
24 | ///
25 | /// Executes the specified parameter.
26 | ///
27 | /// The parameter.
28 | void Execute(object parameter);
29 | }
30 | }
--------------------------------------------------------------------------------
/ComicDesigner/VectorGraphics/GeometryData.xaml:
--------------------------------------------------------------------------------
1 |
4 | m 224.32087 128.13493 c -247.927978 0 -449.12498 121.87533 -449.125 272.0625 0 81.53177 59.36924 154.68267 153.250002 204.56247 -54.924282 55.883 -133.816862 95.5734 -224.062502 108.75 17.35052 1.2706 35.03385 1.9688 53.03125 1.9688 112.44665 -10e-5 213.749102 -25.6431 284.812502 -66.5938 55.68145 14.9965 117.261228 23.4063 182.093748 23.4063 247.92798 0 449.15627 -121.9067 449.15625 -272.09377 0 -150.18714 -201.22825 -272.06249 -449.15625 -272.0625 z
5 |
6 |
--------------------------------------------------------------------------------
/ComicDesigner/ViewModelLocator.cs:
--------------------------------------------------------------------------------
1 | using StyleMVVM;
2 | using StyleMVVM.DependencyInjection;
3 |
4 | namespace ComicDesigner
5 | {
6 | public class ViewModelLocator
7 | {
8 | public ViewModelLocator()
9 | {
10 | ToolbarViewModel = Bootstrapper.Instance.Container.Locate();
11 | }
12 | public ToolbarViewModel ToolbarViewModel { get; set; }
13 | }
14 | }
--------------------------------------------------------------------------------
/ComicDesigner/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Glass/Glass.Basics/Attributes/LocalizedCategoryAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 |
4 | namespace Glass.Basics.Wpf.Attributes
5 | {
6 | [AttributeUsage(AttributeTargets.All)]
7 | public sealed class LocalizedCategoryAttribute : CategoryAttribute
8 | {
9 | private Type resourceType;
10 | private readonly LocalizableString category = new LocalizableString("Category");
11 |
12 | protected override string GetLocalizedString(string value)
13 | {
14 | return category.GetLocalizableValue();
15 | }
16 |
17 | public string Name
18 | {
19 | get { return category.Value; }
20 | set
21 | {
22 | if (category.Value == value)
23 | return;
24 | category.Value = value;
25 | }
26 | }
27 |
28 | public Type ResourceType
29 | {
30 | get { return resourceType; }
31 | set
32 | {
33 | if (resourceType == value)
34 | return;
35 |
36 | resourceType = value;
37 | category.ResourceType = value;
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/Glass/Glass.Basics/Attributes/LocalizedDescriptionAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 |
4 | namespace Glass.Basics.Wpf.Attributes
5 | {
6 | [AttributeUsage(AttributeTargets.All)]
7 | public sealed class LocalizedDescriptionAttribute : DescriptionAttribute
8 | {
9 | private Type resourceType;
10 | private readonly LocalizableString description = new LocalizableString("Description");
11 |
12 | public string Name
13 | {
14 | get { return description.Value; }
15 | set
16 | {
17 | if (description.Value == value)
18 | return;
19 | description.Value=value;
20 | }
21 | }
22 |
23 | public override string Description
24 | {
25 | get { return description.GetLocalizableValue(); }
26 | }
27 |
28 | public Type ResourceType {
29 | get { return resourceType; }
30 | set
31 | {
32 | if (resourceType == value)
33 | return;
34 |
35 | resourceType = value;
36 | description.ResourceType = value;
37 | }
38 | }
39 |
40 | }
41 | }
--------------------------------------------------------------------------------
/Glass/Glass.Basics/Behaviors/DragDrop/ChildrenRetriever.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using Glass.Basics.Wpf.Extensions;
6 |
7 | namespace Glass.Basics.Wpf.Behaviors.DragDrop
8 | {
9 | public static class ChildrenRetriever
10 | {
11 | public static IEnumerable GetChildrenFromPanel(Panel panel)
12 | {
13 | return panel.Children.Cast();
14 | }
15 |
16 | public static IEnumerable GetChildrenFromItemsControl(ItemsControl itemsControl)
17 | {
18 | var items = itemsControl.Items.Cast