• Stars
    star
    260
  • Rank 157,189 (Top 4 %)
  • Language
    C#
  • License
    Other
  • Created almost 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Paint application using Xamarin.Mac and SkiaSharp

Kimono Designer

Kimono Designer allows a developer to graphically edit SkiaSharp based graphic objects that can be converted to code and included in any cross-platform language and OS that SkiaSharp supports.

Key Features

Kimono Designer provides several key features that make it the perfect tool for designing SkiaSharp graphics that can be used in all of your cross-platform applications.

Groups with Boolean Operations and Masks

Multiple shapes can be grouped together and features such as boolean operations and masks can be applied to the items in the group. When applying a mask, the top-most item in the group will be used as the masking path:

Named Palette Colors

A series of named colors can be defined and used in gradients, named styles, by shapes directly or as the basis of other named colors. If a named color is adjusted, everything using the named color will be updated to reflect the new value:

Visual Gradient Editor

Build named gradients that can be used in named styles or in shapes directly using the built-in gradient editor. Any changes to a gradient will instantly be reflected in the sketch:

Named Styles

A series of named styles can be created and applied to several shapes in any sketch in a portfolio to provide a uniform look. Any change in a named style will instantly be reflected in the sketch:

Multiple Sketches within a Portfolio

Multiple sketches can be created inside the same portfolio and all of the named colors, gradients and named styles can be applied across sketches. Additionally, the user has control over how an individual sketch will be exported to source code:

Portfolios

Portfolios can contain multiple named colors, gradients, styles and sketches that can be exported to source code as a single class:

When this class is included in a cross-platform application, the developer can use its properties and methods to adjust graphics properties and draw the individual sketches:

Linked Properties

The user can define several different types of named properties in a portfolio and attach those properties to values for colors, gradients, styles and shapes. Use the Portfolio menu to define a new property of a given type. Next, configure the new property in the Property Inspector:

After the property has been defined, select a color, gradient, style or shape, switch to the Connection Inspector and attach the property to the desired value of the selected item:

When the value of the property changes, any item in the sketch using the property will be instantly updated with the new value:

The following property types can be defined:

  • Boolean - Holds a true or false value.
  • Number - Holds a numeric value.
  • Text - Holds a string value.
  • Rect - Holds a rectangular value.
  • Color - Returns a named color stored in the portfolio.
  • Gradient - Returns a named gradient stored in the portfolio.
  • Style -Returns a named style stored in the portfolio.

In addition to being constant values, properties can derive their values from an attached ObiScript (see ObiScript section below) and dynamically change based on the state of other properties or user interaction.

⚠️ WARNING:

In the current version of Kimono Designer, Linked Properties will be flattened to their current values when source code is generated or exported. To maintain mutable properties, use the KimonoCore Support Library when exporting code (see below for more details).

Source Code Generation

The main purpose of the Kimono Designer is to allow the developer to graphically define SkiaSharp objects that will be converted to source code that can be used in any cross-platform application that supports SkiaSharp.

As the sketch is designed and edited on the Kimono Designer design surface, source code will be generated for the requested operating system, language and support library in the code preview area:

Code Snippets

Based on what is selected, code snippets will be generated for individual colors, gradients, styles, shapes and shape groups. These snippets can be copied from the preview area and pasted into Visual Studio projects:

Generate Code for Multiple Platforms

Source code can be generated for multiple OS platforms with support for Xamarin.Forms (cross-platform) and SkiaSharp.Views (set at the Sketch level):

Use KimonoCore Support Library

Source code can either be generated directly using SkiaSharp classes or by using the KimonoCore helper classes, which produces smaller source code files and provides several useful features (such as mutable linked properties and ObiScript functionality):

When using the helper classes, the developer will need to include the KimonoCore library in any project that consumes the code.

ObiScript

As stated above, portfolio properties can derive their values by executing an attached script written in the ObiScript language. ObiScript is a powerful and easy scripting language built on top of the DScript language (by Darren Horrocks). Because of this, ObiScript's syntax is nearly identical to JavaScript:

When developing or editing an ObiScript, the user can instantly test the script using the Debugging Inspector:

In the event of an error, the Debugger Inspector will give helpful error messages:

In addition to all of the standard language features that JavaScript provides, ObiScript provides the following:

Return Functions

  • Return.Text - Returns a string value to the property.
  • Return.Boolean - Returns a boolean value to the property.
  • Return.Color - Returns a named color to the property.
  • Return.Gradient - Returns a named gradient to the property.
  • Return.NoGradient - Removes the gradient from the property.
  • Return.Style - Returns a named style to the property.
  • Return.NoStyle - Removes the style from the property.
  • Return.Property - Returns the value of another property to the property.
  • Return.Rect - Returns a rectangular value to the property.
  • Return.RaiseError - Raises an error message in the Kimono Designer.
  • Return.ClearResults - Erases the results of the last ObiScript executed.

Portfolio Functions

  • Portfolio.GetBoolean - Gets the value of a boolean property.
  • Portfolio.SetBoolean - Sets the value of a boolean property.
  • Portfolio.GetNumber - Gets the value of a numeric property.
  • Portfolio.SetNumber - Sets the value of a numeric property.
  • Portfolio.GetText - Gets the value of a text property.
  • Portfolio.SetText - Sets the value of a text property.
  • Portfolio.SetRect - Sets the value of a rect property.
  • Portfolio.SetColor - Sets the RGBa value of a color property.
  • Portfolio.SetNamedColor - Sets the RGBa value of a named color in the portfolio.
  • Portfolio.HasColor - Returns true if the portfolio contains the given named color.
  • Portfolio.HasGradient - Returns true if the portfolio contains the given gradient.
  • Portfolio.HasStyle - Returns true if the portfolio contains the given style.
  • Portfolio.HasProperty - Returns true if the portfolio contains the given property.

Console Functions

  • Console.WriteLine - Writes the given string to the Visual Studio output pane and performs a newline.
  • Console.Write - Writes the given string to the Visual Studio output.

Conversion Functions

  • Convert.IntToString
  • Convert.FloatToString
  • Convert.FloatToInt
  • Convert.StringToFloat
  • Convert.StringToInt

Random Number Functions

  • Random.Next
  • Random.NextMax
  • Random.NextMinMax

Math Functions

  • Math.Pi
  • Math.E
  • Math.Abs
  • Math.Round
  • Math.Ceil
  • Math.Floor
  • Math.Min
  • Math.Max
  • Math.Range
  • Math.Sign
  • Math.Sin
  • Math.Cos
  • Math.Tan
  • Math.Sinh
  • Math.Cosh
  • Math.Tanh
  • Math.ASin
  • Math.ACos
  • Math.ATan
  • Math.ASinh
  • Math.ACosh
  • Math.ATan2
  • Math.Pow
  • Math.Sqrt
  • Math.Log
  • Math.Log10
  • Math.Exp

Script Libraries

If the user has a group of ObiScript functions that they want to use across all of the scripts in the portfolio, they can add a Script Library from the Portfolio menu. Unlike a typical property, a Script Library holds a collection of function definitions:

Any script that wants to use the functions in the library will need to add a using library-name; statement to the top of the script:

With that line in place, the user can call any function from the library as if it was defined inside the current script.

⚠️ WARNING:

In the current version of Kimono Designer, Linked Properties and ObiScripts will be flattened to their current values when source code is generated or exported. To maintain mutable properties and ObiScripts, use the KimonoCore Support Library when exporting code (see above for more details).

Work in Progress

This app is very much a work-in-progress and still has several rough areas and missing features (such as copy & paste). Up to this point, work has been focused on getting the core functionality in place, so there are also areas where the User Interface needs to be refined and polished. For now, the app is definitely use at your own risk!

While the editor is currently implemented in Xamarin.Mac and only runs on macOS, the project was designed to be built cross-platform. As such, most of the editor code has been implemented in the back end KimonoCore library and platform specific versions of the core libraries have already been built.

It is hoped that the front end Kimono Designer will be ported to other platforms such as Windows UWP, iOS for iPad and for Android Tables.

About this Project

Kimono Designer and the KimonoCore libraries were created by Microsoft, Inc. and released under the MIT License. The design of the TextBase ORM is based off of Sqlite.Net by Krueger Systems, Inc.

The code has been fully commented and, where available, links have be provided from key technologies or methods to relevant information in the Xamarin.Mac Guides Documentation.

API Documentation

Full API documentation is provided via a ReadMe file in project folder for each Visual Studio project that makes up the Kimono Designer solution.

Icon Resources

All of the icons were provided by Icons8. The icons are free for personal use and also free for commercial use, but they require linking to to their web site. They distribute them under the license called Creative Commons Attribution-NoDerivs 3.0 Unported. Alternatively, you can buy a license that doesn't require any linking.

License

Kimono Designer

Copyright (c) Microsoft Corporation

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
C#
5,637
star
2

xamarin-forms-samples

Sample apps built using the Xamarin.Forms framework
C#
4,304
star
3

xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
C#
2,441
star
4

monodroid-samples

A collection of Xamarin.Android sample projects.
C#
2,197
star
5

XamarinComponents

Plugins for Xamarin
C#
1,990
star
6

ios-samples

Xamarin.iOS sample apps
C#
1,593
star
7

XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
C#
1,588
star
8

Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
C#
1,523
star
9

mobile-samples

C#
1,460
star
10

XobotOS

XobotOS - Android ported to C#
Java
1,246
star
11

xamarin-forms-book-samples

Code samples for "Creating Mobile Apps with Xamarin.Forms"
C#
725
star
12

docs-archive

Xamarin docs archive
Java
565
star
13

Xamarin.Auth

Xamarin.Auth
C#
544
star
14

urho

Code to integrate with the Urho3D engine
C#
463
star
15

app-crm

C#
384
star
16

urho-samples

Samples for the Urho bindings
C#
383
star
17

Sport

C#
358
star
18

Monkey.BluetoothLE

BluetoothLE abstraction for use with Xamarin projects, including Xamarin.Forms.
C#
348
star
19

mac-samples

Sample programs showing how to use Xamarin.Mac on OSX.
C#
321
star
20

GooglePlayServicesComponents

C#
307
star
21

WebSharp

Support for running C# on the web browser.
C#
302
star
22

mqtt

Minimalist and intuitive MQTT broker and client written entirely in C#
C#
297
star
23

dev-days-labs

C#
295
star
24

SignaturePad

C#
246
star
25

GoogleApisForiOSComponents

C#
224
star
26

prebuilt-apps

Complete, prebuilt apps for you to customize and deploy.
C#
217
star
27

xamarin-forms-book-preview-2

Sample code for the 2nd Preview Edition of "Creating Mobile Apps with Xamarin.Forms"
C#
209
star
28

flex

Flex is a flexible box layout system written in C, designed to be easy to consume from other languages
C
192
star
29

Workbooks

C#
188
star
30

AndroidX

AndroidX bindings for .NET for Android
C#
168
star
31

binding-tools-for-swift

C#
154
star
32

AndroidSupportComponents

Xamarin bindings for Android Support libraries - For AndroidX see https://github.com/xamarin/AndroidX
C#
145
star
33

XamarinStripe

Stripe.com .NET bindings
C#
134
star
34

Xamarin.Social

Xamarin.Social
C#
125
star
35

AngryNinjas

Angry Ninjas Cocos2D/XNA Sample
C#
120
star
36

customer-success-samples

Xamarin Customer Success
104
star
37

KinderChat

Secure Texting for Children
C#
98
star
38

VervetaCRM

Publicly available CRM demonstration app.
C#
97
star
39

ExposureNotification.Sample

A sample cross-platform mobile app and server for exposure notifications.
C#
94
star
40

mini-hacks

Complete four mini-hacks during Evolve and get a prize.
C#
89
star
41

PortableRazor

A lightweight implementation of ASP.NET MVC APIs for mobile devices.
C#
89
star
42

FacebookComponents

C#
86
star
43

Seminars

Sample code used in the Xamarin Seminars
C#
68
star
44

amazon

Library for accessing Amazon web services from mobile apps
C#
62
star
45

xamarin-forms-book-preview

Sample code for the Preview Edition of "Creating Mobile Apps with Xamarin.Forms"
C#
61
star
46

mac-ios-samples

Samples targeting both iOS and OSX that share code.
C#
56
star
47

XamarinAzureChallenge

Create an iOS/Android app using Xamarin.Forms and connect it to a serverless Azure Function
C#
56
star
48

Touch.Unit

NUnitLite based runner for unit testing .NET code under iOS
C#
50
star
49

google-apis

Google API bindings for Xamarin.
C#
47
star
50

xamarin-evolve-2014

Slides, Demos and Training samples for Evolve 2014 from Xamarin University
C#
45
star
51

mobcat

43
star
52

Rivets

A C# implementation of App Links, functionally, a port of Bolts
C#
43
star
53

app-xamarintv

Xamarin.Forms app demonstrating the dual-screen device capability for neo and duo devices
C#
42
star
54

Xamarin.Forms.CarouselView

C#
41
star
55

Xamarin.Forms.GraphQL

C#
41
star
56

evolve-quest

Evolve Quest is an iBeacon based scavenger hunt that attendees enjoyed at Evolve 2014
C#
35
star
57

android-activity-controller

C#
35
star
58

xamarin-iot-samples

Samples for Xamarin IoT
C#
35
star
59

monotouch-element-pack

A place to host various MonoTouch.Dialog.Elements that users can use.
C#
35
star
60

Xamarin.Forms-api-docs

Xamarin.Forms API documentation in ECMA XML format
PowerShell
34
star
61

PortableRazorStarterKit

A starter kit for PortableRazor.
JavaScript
34
star
62

Xamarin.Legacy.Sdk

Starting from a .NET 6 project, adds the ability to target legacy Xamarin target frameworks such as monoandroid11.0 or xamarin.ios10. *Not fully supported*
34
star
63

SalesforceSDK

Salesforce SDK component
C#
31
star
64

apple-api-docs

Xamarin.iOS & Xamarin.Mac API documentation in ECMA XML format
F#
27
star
65

sketches

Xamarin Sample Sketches
26
star
66

benchmarker

A simple benchmarking and comparison tool
C#
26
star
67

Xamarin.MacDev

Support libraries for xamarin-macios
C#
25
star
68

mirepoix

A small collection of utility APIs including command line argument splitting and quoting, file system globbing, cross platform process execution, and console output redirection handling.
C#
25
star
69

Xamarin.PropertyEditing

C#
24
star
70

xamarinu-connect2016

C#
23
star
71

app-customers

A simple demo app with three screens: a list screen, a read-only detail screen, and an editable detail screen.
C#
23
star
72

xunit

xUnit
C#
22
star
73

MyCompany

C#
22
star
74

jar2xml

Java Archive API extraction tool
Java
19
star
75

android-api-docs

Android API documentation
PowerShell
19
star
76

demo-xamarincrm

C#
19
star
77

Urho3D

Clone of the Urho3D repository
C++
19
star
78

XamarinAndroidXMigration

Build tasks and tools to support Xamarin.Android AndroidX migration
C#
18
star
79

xamarin-evolution

Maintains proposals for changes to the Xamarin SDKs (Android, iOS, Forms, Components, Urho, Skia)
18
star
80

dropbox-sync-component

C#
18
star
81

vs-mono-debugger-sample

Sample showing how to use the Visual Studio Mono Debugger for your own Mono-based project types
C#
17
star
82

DocWriter

Desktop Editor for the ECMA XML Documentation
C#
16
star
83

evolve-presentation-template

Evolve 2016 Presentation Templates
HTML
15
star
84

SaveTheDate

C#
14
star
85

xamarin-windows

Provides reusable MSBuild tasks and sample Visual Studio tooling for building and debugging Mono AOT compiled binaries
C#
14
star
86

fsharpbinding

F# binding for MonoDevelop (updated to support Xamarin Studio)
F#
14
star
87

Windows.Injector

Allows injecting .NET code into a remote process in Windows
C++
13
star
88

web-tests

C#
12
star
89

md-xamarin-fsharp-addins

F# magic
F#
11
star
90

fsharp-iOS-designer

iOS designer integration for F#
F#
11
star
91

moq

The most popular and friendly mocking library for .NET and Xamarin
C#
9
star
92

sales-uitest-extensions

Extension methods for UITest
C#
7
star
93

component-template

A sample template that you can use as a guide to create your own components.
Ruby
7
star
94

xamarin-android-binutils

LLVM toolchain for Xamarin.Android
C++
7
star
95

evolve-2014-presentation-template

Evolve 2014 Presentation Template
7
star
96

emscripten-test

C
6
star
97

Gendarme.Rules.Xamarin

Gendarme static analysis rules for Xamarin.
C#
6
star
98

NuGetizer3000

C#
6
star
99

Wikitude

C#
6
star
100

release-notes-archive

Xamarin release notes from 2018 and earlier
HTML
6
star