• This repository has been archived on 07/May/2021
  • Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    C#
  • License
    MIT License
  • Created about 12 years ago
  • Updated over 3 years ago

Reviews

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

Repository Details

Useful library for data driven Windows Phone 8 and Windows 8 C# / XAML WinRT projects

Q42.WinRT [Archived]

Open source library for Universal Apps, Windows Phone and Windows 8 C#/XAML applications. This library was originally developed for Windows 8 and is fully compatible with Universal Apps (Windows Phone and Windows 8.1). There's also a version for Windows Phone 8. The library is focused on web connected and data driven applications. It includes helpers to easily cache data from API calls and cache web images to the local storage.

This library helps to maximize code reuse between Windows 8 and Windows Phone 8

Please checkout the included sample application for Universal Apps, Windows 8 and Windows Phone.

Or download directly from NuGet:

Looking for the old version compatible with Windows 8.0? Last 8.0 commit / NuGet package 1.0.14.42

What's included?

With this library comes a fully functional sample application that shows off most of the functionality. There's also a unit test project included.

Data Universal apps (W8.1 and WP81) Windows Phone 8
DataLoader x x
DataCache x x
WebDataCache x x
StorageHelper x x
SettingsHelper x x
ImageExtensions.CacheUri x x
Converters Universal apps (W8.1 and WP81) Windows Phone 8
VisibilityConverter x x
InverseVisibilityConverter x x
ByteToStringConverter x x
StringFormatConverter x
TextToLowerConverter x
Helpers Universal apps (W8.1 and WP81) Windows Phone 8
Util.GetAppVersion x
Util.GetOsVersion x
Util.GetMachineName x
Controls Universal apps (W8.1 and WP81) Windows Phone 8
WrapPanel x
Background Parallax x
UserControl Flyout x

Data

  • DataLoader - Input a task, enables easy binding to Loading / Finished / Error properties (show progress bar as long as task is running)
  • DataCache - Input a Cache Key and API call. Will run the task to get the response (for example a web call with json result) and write it to the cache. On next call, will return response directly from cache. Can be used in combination with DataLoader.
  • DataLoader.LoadCacheThenRefreshAsync - Input two methods which get data from cache and web. Callback will fire twice. You can bind to the dataloader to show a progress bar.
  • WebDataCache - Input an URI. Will get the data from the web and write raw bytes to local storage. On next call, it will return the cached data from the local storage.
  • StorageHelper - Save and retreive objects to the local storage. Json or XML serialization is used.
  • SettingsHelper - Save and retreive settings (wrapper around the different settings api's on Windows 8 or Windows Phone)
  • ImageExtensions.CacheUri - Alternative to Source property for images. Will get image from web and cache it. On a next run, will return cached image.

Converters

  • VisibilityConverter - Convert anything to visibility, works with bools, ints, strings, objects etc
  • InverseVisibilityConverter - Inverse of the VisibilityConverter
  • ByteToStringConverter - Converts bytes to a nice string, like 5.14 MB
  • StringFormatConverter - String format helper
  • TextToLowerConverter - Converts all text to lower text

Helpers

  • Util.GetAppVersion - Gets the application version as formatted string (1.0.0.0)
  • Util.GetOsVersion - Gets the version of the OS (for now: Windows NT 6.2, can change in the future)
  • Util.GetMachineName - Returns the machine name

Controls

  • WrapPanel - WrapPanel ported from Silverlight. Allows variable sized controls and wraps to a new line when needed.
  • Background Parallax - Creates a background parallax effect like on the Windows 8 start screen
  • UserControl Flyout - Flyout that hosts a UserControl with custom data. Can be used to create a Settings Flyout and have full control over the layout

How To Install?

Download the source including the sample code from GitHub or install from NuGet:

How To Use?

Check out the included sample app and unit tests for Windows 8 and Windows Phone.

DataLoader introduction

Let's say you have a long running async operation which gets some data from the web.

var result = await LoadWebData();

You want to show a nice progress bar when you're busy loading the data. Use the DataLoader for that, it wraps around your existing code. Place this code in your ViewModel:

//public property you can bind to
public DataLoader DL { get; set; }

//Place this in the constructor of your ViewModel:
DL = new DataLoader();

//Somewhere where you want to start loading data
var result = await DL.LoadAsync(() => LoadWebData());

You can now bind your ProgressBar to the DataLoader's IsBusy property in your XAML:

<ProgressBar IsIndeterminate="{Binding DL.IsBusy}"></ProgressBar>

For more advanced scenarios, see the included sample apps and unit tests.

DataCache introduction

Let's say you want to cache the result when you grab some data from an external source

List<MyData> result = await DataCache.GetAsync("your_key", () => LoadWebData());

The next time you do the same call, you get the cached result. You can combine this with the DataLoader to show a ProgressBar:

List<MyData> result = await DL.LoadAsync(() => DataCache.GetAsync("your_key", () => LoadWebData()));

For more advanced scenarios, see the included sample apps and unit tests.

License

Q42.WinRT is licensed under MIT. Refer to license.txt for more information.

Contributions

Contributions are welcome. Fork this repository and send a pull request if you have something useful to add.

Credits

Open Source Project Credits

Some code is used from other open source projects.

Related Projects

Other useful WinRT / Windows 8 projects.

More Repositories

1

AndroidScrollingImageView

An Android view for displaying repeated continuous side scrolling images. This can be used to create a parallax animation effect.
Java
1,782
star
2

delighters

Add CSS animations to delight users as they scroll down.
HTML
748
star
3

TrelloScrum

Add Scrum to Trello
JavaScript
447
star
4

floating-focus-a11y

A clear, beautiful and easy to implement focus-state solution.
JavaScript
147
star
5

coffeehack

Hack of our Jura coffee machine
Arduino
140
star
6

hue-libs

A community created list of Hue libraries in several languages
123
star
7

meteor-gce

Install scripts to run Meteor on Google Compute Engine
Shell
56
star
8

LiveJS

Live.js makes sure you're always looking at the latest version of the page you're working on, whether you're writing HTML, CSS or Javascript.
JavaScript
53
star
9

Qlassified-Android

An Android Wrapper Library for easy Keystore Encryption
Java
48
star
10

meteor-gke

Deploy scripts to run Meteor on Google Container Engine and Kubernetes
Shell
45
star
11

vue-dotnet-validator

Client-side validator of .NET data-annotations using vue.js
JavaScript
44
star
12

QreditRoll

JavaScript
36
star
13

RxPromise

A Promise wrapper around RxJava's Observable
Java
27
star
14

openapi-typescript-validator

Generate typescript with ajv validation based on openapi schemas
TypeScript
26
star
15

sanity-plugin-page-tree

TypeScript
25
star
16

Tolbaaken

A pure Kotlin logging library for Android with zero overhead.
Kotlin
24
star
17

Bindable

Simple Swift Variable<Value>
Swift
24
star
18

fabricjs-opentypejs-demo

Demo of fabricjs rendering fonts using opentypejs
JavaScript
22
star
19

RefreshableScrollView

A SwiftUI scroll view that supports pull to refresh
Swift
20
star
20

meteor-autoform-markdown

A simple markdown textarea with preview using perak:markdown
JavaScript
16
star
21

autovars

Reactive state management for Meteor + React
JavaScript
15
star
22

Jue

Philips Hue API for Java
Java
14
star
23

SimpleOAIHarvester

Example implementation of an OAI harvester as a python script.
Python
14
star
24

StyledString

Easy Attributed Strings in Swift
Swift
14
star
25

vue-multi-loader

Vue.js component loader for webpack, using webpack loaders for the parts
JavaScript
14
star
26

SEE

SEE! Chrome extension helps you imagine what it’s like to be visually impaired
JavaScript
12
star
27

Orchard-DbTranslations

Enables interface translation feature directly in Orchard's admin panels instead of .po files
C#
12
star
28

meteor-accounts-microsoft

A login service for Microsoft accounts.
JavaScript
11
star
29

pomotv-app

iOS client for http://pomo.tv
Swift
11
star
30

CT-3000

A tool for teaching Computational Thinking to kids
JavaScript
10
star
31

DecorJS

The Decor JS framework
JavaScript
10
star
32

HaagsTranslator

C#
10
star
33

MarzipanDemoApp

Demo app used in β€œHacking Marzipan” talk at Do iOS 2018
Swift
9
star
34

Q42.RijksmuseumApi

Open source library for interaction with the Rijksmuseum API
C#
8
star
35

meteor-admin-assetmanager

Easily upload files to Meteor Admin (yogiben:admin).
JavaScript
7
star
36

lesswatch

LESS folder watcher with optional debug information
7
star
37

Template.Android

Kotlin
7
star
38

ValidationKit

A Swift library for validating user input, for example in forms.
Swift
7
star
39

meteor-gke-example

An example Meteor app that can run on Kubernetes.
JavaScript
6
star
40

json-typescript-decoder

Type safe JSON validation for Typescript
TypeScript
6
star
41

Salad

Lightweight Cucumber-style UI tests for iOS.
Swift
6
star
42

Q42Stats

Project to gather some statistics around how platform features are used
Swift
6
star
43

sanity-plugin-user-guide

A Sanity plugin to add a simple user guide to the CMS
TypeScript
6
star
44

meteor-ezpublish

publish a collection once and let subscibers determine the details
JavaScript
6
star
45

meteor-microsoft

An implementation of the Microsoft OAuth flow.
JavaScript
6
star
46

Q42.ImagePreview.swift

iOS client for the Q42.ImagePreview.net images.
Swift
6
star
47

ElementDiff

Animate tableview for view model arrays.
Swift
5
star
48

meteor-memcached

Memcached package for meteor without Npm module requirements, based on 3rd-Eden node-memcached: https://github.com/3rd-Eden/node-memcached
JavaScript
5
star
49

Q42Stats.Android

Project to gather some statistics around how platform features are used
Kotlin
4
star
50

meteor-wait-for-image

JavaScript
4
star
51

meteor-iBeacons

just a quick hack combining Meteor with iBeacons using petermetz' Cordova plugin
JavaScript
4
star
52

mc-robot

MC Robot. A multi-cluster automator.
Go
4
star
53

Q42.ImageResizert

Image resizing for dotnet core mvc projects using ImageMagick
C#
4
star
54

VR-Fullbody

Fullbody Mocap VR Demo
C#
4
star
55

RefreshableScrollViewDemo

Sample code for refreshable custom SwiftUI views
Swift
4
star
56

OneBridge

To rule them all
Go
3
star
57

android-things-rainbow-hat-kotlin

A Kotlin demo app to play with Android Things running on a Raspberry Pi and a Rainbow Hat.
Kotlin
3
star
58

q42.wheels.caching

C# Nuget package with wrappers for caching functionality
C#
3
star
59

lighthouse-plugin-social-sharing

Lighthouse Plugin for an audit on Social Sharing meta tags
JavaScript
3
star
60

pending-changes

Meteor package to keep track of pending changes on collections
JavaScript
3
star
61

lighthouse-plugin-sample-project

A sample project for showing an integration with Lighthouse CI & Lighthouse Plugin in GitHub Actions.
3
star
62

NoticeWindow

A customizable notice component for iOS
Swift
3
star
63

dftool

A tool to export Dialogflow intents and config from one project and import them into another
JavaScript
3
star
64

logo

Q42 logorepo
JavaScript
2
star
65

meteor-installable-web-app

Make your Meteor app installable to the home screen
JavaScript
2
star
66

hillchart-q42-nl

The Amazing Hill Chart Drawing Tool
Vue
2
star
67

Meteor-Promissum

A Promise wrapper for Meteor
Swift
2
star
68

The.Hitchhikers.Readme

Opiniated readme template for your closed source project
2
star
69

hue2

Hue Limited Edition Android app
Java
2
star
70

3D

Everything 3D, STL's, Fusion files, step files, Prusa Slicer projects, gcode files
2
star
71

Q42.ImagePreview.Net

C#
2
star
72

ci-tools-n-scripts

Continuous Integration tools & scripts frequently used and re-used between projects
Shell
2
star
73

Q42.Logging.ApplicationInsights

Log to ApplicationInsights using the default ILogger
C#
2
star
74

Picker

Pick a value using a promise
Swift
2
star
75

meteor-mind-meld

Easily transfer collection data from one Meteor instance to another.
JavaScript
2
star
76

meteor-continuous-deployment

A helping hand in utilizing Meteor UP and Travis with a few scripts.
JavaScript
2
star
77

tslint-react-native-a11y

TSLint rules to enhance accessibility in React Native apps.
TypeScript
2
star
78

Orchard-AdminSpecificCulture

Orchard Module to enable a specific culture for the admin
C#
1
star
79

gcp-sema

Command-line utility to access and update GCP SecretManager secrets
Go
1
star
80

Minesweeper.iOS

Minesweeper voor iOS, gebouwd in SwiftUI door Kalle en MathijsB
Swift
1
star
81

meteor-custom-scheme

A wrapper for the Cordova Custom-URL-scheme plugin by EddyVerbruggen
JavaScript
1
star
82

MWHackathon

Museums and the Web Hackathon april 2012
C#
1
star
83

CATiledLayerBug

Demonstration of CATiledLayer shows previous tiles bug
Swift
1
star
84

template-ios

A template for creating iOS projects at Q42.
Swift
1
star
85

gcode-sort

Optimize a GCODE file by reducing the total time spent moving the bit (G0) vs cutting or carving (G1)
Svelte
1
star
86

fastlane-plugin-qr_code

Fastlane plugin that generates QR codes that you may use in the rest of your workflow.
Ruby
1
star
87

yaml-templater

Go
1
star
88

Q42.ImagePreview.java

Android client for the Q42.ImagePreview.net images.
Kotlin
1
star
89

blurpaderp

Generate random pronouncable ids
JavaScript
1
star
90

Tondor.iOS

Re-creation of the Tinder user interface in SwiftUI
Swift
1
star
91

GrantForTheWeb.MicrioConcepts

Micrio POCs with the Web Monetization API
HTML
1
star
92

hue-traffic-light

Indicate your current mood by setting a traffic light color on one of your Hue lights
Svelte
1
star
93

OculusUnrift

JavaScript
1
star
94

IAP-prog-auth

Google Identity Aware Proxy Programmatic Authentication
TypeScript
1
star
95

vuejs-firestore-demo

Demo for Smashing Magazine
JavaScript
1
star
96

NBA.Client

Naturalis Netherlands Biodiversity API Client
C#
1
star
97

w00tcamp-ptsm

Stop spam & get your deserved financial reward for reading mails. Let senders pay for emailing you.
Go
1
star