Project Description
The project is a windows store runtime component which provides some of the handy controls which may be needed in developing LOB apps on windows 8.


As of now I have only added signature control and in coming future in will be adding more components such as winrt nav bar control, and some trivial helper methods to make working on store apps easier.

 

1. Signature Control

add reference to control

 xmlns:ctrls="using:Mazik.WinRT.Components.Controls"

declare signature controls as below

<ctrls:MzkSignature Title="Customer Representative Signature" FileName="Sign" Grid.Row="1" Height="250" AccentColor="Gray" HorizontalAlignment="Center"/>

Title: sets title of the control

FileName: the drawing on canvas is saved as an image, file name give user defined name to the signature image file

 

 

 

 


 

Now, to read the signature back

private async Task<Stream> GetLocalResource(string fileName)
{
try
{
var file = await ApplicationData.Current.LocalFolder.GetFileAsync(fileName);
var stream = await file.OpenAsync(FileAccessMode.ReadWrite);
return stream.AsStreamForWrite();
}
catch (Exception)
{
return Stream.Null;            
}
}

 

Last edited Feb 4, 2014 at 10:49 AM by syyad, version 8