Swiping Coming Soon!

Update 1.19 is rolling out to the Microsoft Store now. This update brings a highly requested features: natural swiping between views. Now you can change the view by swiping or by clicking the next/previous buttons as always.

This change introduced a fairly major change to the way Ink Calendar handles the different sets of ink + calendars. I have done lots of testing for performance and found it to be acceptable. However it is impossible for me to test every device. I’ll be watching the crash statistics and will continue to optimize Ink Calendar with future updates.

Hopefully this update makes Ink Calendar more natural and easier to use. If you have suggestions, comments, or feedback then please reach out by email (support@inkcalendar.com) or twitter (@thejoefin).

Thanks again for using Ink Calendar.

Joe

P.S. If you are a digital artist using Ink Calendar and are interested in being paid for some promotional artwork please reach out and we can work something out.

The Custom Pen Gallery: part 3

Adding a new pen

Saving the pen gallery was not very complicated, but there were some unfortunate complexities. The major complexity was how to initiate a change to the pen gallery. The standard UWP InkToolbar does not provide any events relevant to if or when the user changes any of the tool’s drawing attributes.

When to save

Obviously Ink Calendar should save the Pen Gallery when the users adds a new pen, deletes a pen, or moves the location of a pen. However it is also important that changes to the pen’s properties get saved when they are changed.

The way I decided to trigger this save was on ink saving. This means when the user navigates or inks the SaveInk method runs and that would trigger the SaveCustomPens method to fire.

To keep Ink Calendar from saving the custom pen file every time ink was saved the beginning of the SaveCustomPens method checks to make sure there are changes to save. If there are changes then the current InkToolbar is converted into an array and saved to a .XML file.

Convert the InkToolbar into an array

Before the pen gallery can be saved to a file it is converted to a simple List<string[]>. This is done by iterating through each button and saving an entry in a new string array for the type of pen (ballpoint, highlighter, or pencil), the selected brush index, and the stroke width, and a Pen ID.

There is another method which takes the data from this type of array and adds InkToolbarCustomPen to the InkToolbar.

Saving the List to .XML

The next step was simple, pass the List<string[]> to a method which saves it to the app’s directory. DotNET has some very easy APIs for serializing data and saving it to a file.

public static async Task SaveCustomButtons(List<string[]> listToSave)
{
    StorageFile file = await ApplicationData.Current.LocalFolder.CreateFileAsync("CustomToolButtons.xml", CreationCollisionOption.ReplaceExisting);
    XmlSerializer serializer = new XmlSerializer(typeof(List<string[]>));
    using (Stream fs = await file.OpenStreamForWriteAsync())
    {
        TextWriter textWriter = new StreamWriter(fs);
        serializer.Serialize(textWriter, listToSave);
    }
}

This is a sample method of how I save data throughout Ink Calendar. Right now the data generated by the app is fairly simple and low volume. Eventually Ink Calendar could grow to a point where it needs a SQLite database but for now .XML does the trick.

Thanks for reading and let me know if you have any questions or comments. Next I’ll talk about how I enabled the pen gallery to be edited on all form factors.

 

Joe

The Custom Pen Gallery: part 2

Adding a pen gallery was simple at first but I decided to add some more to the custom tool button. In my initial attempt I would initialize a new InktoolbarCustomPenButton and set its properties in code then add it to the Inktoolbar.

While this did work it left the issue of having two pens of the same type and color but different size and not being able to differentiate between them. So I decided to make a custom XAML control for custom pens, custom highlighters, and custom pens.

I started with a user control, but then just made a custom control of type InkToolbarCustomPenButton. I could customize the content of each of these controls to match the default inktoolbar buttons. To find these symbols I used the awesome app Character Map UWP by Edi Wang (Store Link HERE). I needed the tool outline, the tip and top color, and the background fill.

I bound the fill of the tip and top color to the SelectedBrush property of the InkToolbarCustomPenButton. Then I bound the background fill to the background of the InkToolbarCustomPenButton. This is so when the size shape is big enough it won’t make the tool icon look transparent.

17 Resize Pens

For the size representation, pen and pencil use an ellipse and highlighter uses a rectangle which the fill is bound to the SelectedBrush property and the height and width both bound to SelectedStrokeWidth. With oneway binding the shape would change color and size as the user adjusted the pen options.

Now when the users clicks “New Pen” an instance of my custom control is created and added to the inktoolbar. Simple. Users could add as many pens as they wish. They are in a scrollviewer so they can all be seen with a quick flick.

Next is the challenge of saving and loading this custom gallery each time the app loads.

Joe

The Custom Pen Gallery: Part 1

In UWP there is a control called the InkToolbar. This is a control which binds to an InkCanvas and is an easy way for users to change the type, size, and color of their inking. Ink Calendar has used this control from day one but now it is getting some attention.

The UWP version of OneNote has a pen gallery instead of the standard InkToolbar control. This enables users to set several pens and easily switch between them, without tediously changing each attribute every time. I wanted to bring the same experience to Ink Calendar because I found myself using a only few different pens while planning my time. One was a medium thickness gray pen for crossing out days. One was a thin blue pen for writing down appointments. And finally one was a highlighter for blocking out chunks of days.

There where four key elements to making my custom pen gallery in the InkToolbar.

  1. Custom Pens
  2. Custom Pen Button
  3. Saving the gallery
  4. Editing the gallery

To make this control I had to create custom pens for the Ballpoint Pen, Highlighter, and Pencil. You cannot add more than one standard tool to the InkToolbar, you must make them InkToolbarCustomToolButtons. Each type of InkToolbarCustomToolButton requires its own InkToolbarCustomPen to define how the ink will display when that tool is active.

protected override InkDrawingAttributes CreateInkDrawingAttributesCore(Brush brush, double strokeWidth)
{
      InkDrawingAttributes inkDrawingAttributes = new InkDrawingAttributes
      {
          PenTip = PenTipShape.Circle
      };
      SolidColorBrush solidColorBrush = brush as SolidColorBrush;
      inkDrawingAttributes.Color = solidColorBrush?.Color ?? Colors.Red;
      inkDrawingAttributes.DrawAsHighlighter = false;
      inkDrawingAttributes.Size = new Windows.Foundation.Size(strokeWidth * 0.5, strokeWidth * 0.5);
      return inkDrawingAttributes;
}

I made three custom pens: ballpoint pen, highlighter, and pencil. I could have chosen to make the highlighter tip shape round instead of rectangular like the standard InkToolbar highlighter, but I decided to keep it consistent to how it has been. I could still add a new pen like a highlighter but more of a marker with a round tip.

Once I had all the custom pens I needed I started working on the InkToolbarCustomToolButtons. These controls inherit from InkToolbarCustomPenButton which enables them to be added into an InkToolbar. These buttons started simple but I made them a little more complex than the standard.

Up next… the InkToolbarCustomPenButton XAML.

Joe

Enjoy Ink Calendar in your own language

In the new update 1.14 Ink Calendar will use the language settings you have set in Windows 10. The month names, days of the week, and day abbreviations will all be translated automatically by Windows.

Next up I will be translating the text in the app itself. All the button text will soon be translated with the help of anyone I know who speaks that language! If you’d like to help translate then email support@inkcalendar.com

As always, thank you for using Ink Calendar

-Joe

Advanced Settings for 1.10

Version 1.10 will not be a big release from forward facing features but it will provide some much requested advanced settings. These are settings for people who are interested in making backups of their ink and deleting all their ink.

Another big element of this release is using the roaming app data service to sync ink between devices. I’ve named this ‘slow sync’ because this service is very slow. While slow it does work and is free for me to implement so I decided to add this as a feature for those who want to try to use it.

With the slow sync come the risk of overwriting ink from one device by inking on another device. To reduce this issue I’ve added the ability to backup and load ink, and the ability to set a device as a view-only device. These view-only devices will not save the ink and this should reduce the risk of ink overwrite.

There are many little things which can go wrong when implementing features like these so please be careful and let me know if something doesn’t work the way you think it should.

Thanks for using Ink Calendar,

Joe

 

P.S. The support@InkCalendar.com email was broken because of a domain name thing, but it is fixed now.

P.S.S. Microsoft is having technical troubles with flights so I don’t know when this update will get pushed out.

Progress with 1.7

Update 1.7 is coming along nicely. I have added lots of changes under the hood and I have discovered the source of the crashing when sharing, saving, and printing on mobile.

The changes that I have made under the hood are not tied in so they won’t affect normal app usage. I am still experimenting with how to arrange and organize ink data with relation to the days. It is very simple to associate a month with an ink file, but when you start to move to weeks, or work weeks, or arbitrary date spans it becomes much more tricky.

The source of the crashing of share, print, and save was a result of low ram devices. I tested saving an ink file on device with 512MB, 1GB, 2GB, and 3GB. I’d been doing all of my mobile testing on my Lumia 830 which only has 1GB of RAM and I was experiencing the crashing. When I downloaded a few more mobile emulators I discovered it was related to the available RAM to Ink Calendar.

To remedy this for now I have added a line which checks for the available amount of RAM and enables or disables the buttons accordingly. Long term I would like to find a way to share, print, and save more efficiently and enable those features on more devices, but for now this will have to work.

Thanks again for using Ink Calendar! If you haven’t rated/reviewed Ink Calendar in the app store I would really appreciate it!

-Joe

What’s next for 1.7

In the next release I plan to focus under the hood. This means improving the way I organize, save, and load data. With more organized data I’ll be able to manage more of it!

For example adding a week view is in the plan. Things that makes that strange. Weeks are not as organized as Months are. Their method of being organized is not as clean and consistent.

This means I’ll need to come up with a system of organizing weeks, their days, and their data. This should not be hard, but it is work that takes time.

In addition to hidden improvements I plan on going after some bugs which prevented some features from being available on mobile. Specifically the share, save, and print capabilities. When I was testing these on mobile without fail they would crash the app every time with no error. This makes debugging harder. I’ll be looking for new ways to tackle and fix this/these bugs in this update.

Thanks for using Ink Calendar! Feel free to contact me on twitter (@TheJoeFin) or email (support@Inkcalendar.com),

-Joe

#1 Requested Feature is right around the corner

Easily the number one requested feature for Ink Calendar is existing Google and Outlook calendar integration. Soon with version 1.6 that will be possible.

I thought adding the calendars would involve lots of extra authentication and a refactoring of the codebase. However, as it turns out Windows 10 has an API for that. I can request a list of appointments from Windows and all the added calendars will stream in.

The feature works by getting the calendar data from the built-in calendar application. If you have added a calendar there then it gets pulled into Ink Calendar. I’ll be adding more granular control around which calendars you want to include, but I did not want to delay this highly requested feature. I’m excited to roll this feature out soon. Let me know what you think!

Thanks again for using Ink Calendar,

-Joe

Features Missing From Mobile

Ink Calendar is available on Windows 10 Mobile. I made this decision because the core functionality of the app works reasonably well on a mobile device with a decent sized screen. Also I want to build a backend for to sync the ink across devices.

While testing new features on my Windows 10 Mobile device I discovered that there were some strange behaviors. When adding the share, save, and print capabilities they would immediately crash the app on mobile. No warning, no exception thrown, no error message while debugging.

When adding the ability to cut, copy, and paste ink the code was fairly simple. I followed the sample app supplied by Microsoft and it was easy to implement. When testing this ability on mobile I got strange errors and the functionality was not there. The ink content presenter could never paste.

These are fairly minor issues and the core functionally of the app is still there, but the errors are odd. Errors like this make it more clear to me that while Microsoft likes to tout how Windows 10 and Windows 10 Mobile can both run UWP apps… that just is not true. Windows 10 Mobile is so different from Windows 10 that it needs not just UI tweaks to make apps work.

Hopefully any mobile device from Microsoft in the future will come from Windows 10 because that would simplify development and make Ink Calendar way better on that mobile device.