Snippets for advanced controls UWP

I am preparing a new app, and contains complex controls to make user things easy (you know more simple user interface more complex coding). Today 2 snippets:

The features of the first control, a multiple state selector are:

  • Have at least one option always selected.
  • Know what is the latest selection.
  • Just be able to select one.
private void RegisterFrequencyChanges()
	CurrentFrequency = frequencies.Last();
	foreach (var frequency in frequencies)
		frequency.PropertyChanged += Frequency_PropertyChanged;

private async void Frequency_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
var f = sender as Frequency;

if (e.PropertyName == nameof(f.On))
	if (f.On)
		CurrentFrequency = null;
		foreach (var frequency in Frequencies)
			if (frequency != f)
				frequency.On = false;
		CurrentFrequency = f;
		if(f == CurrentFrequency)
			await Task.Delay(60);
			f.On = true;

The clue here when is raised NotifyPropertyChanged event is the call to await Task.Delay(60); if you do not wait a bit it won’t be reflected in the View.

And the second snippet. An issue I was able to solve is to keep a visual state even the cursor it is outside the window and then when it is released even outside the window, the app get’s the result and goes back to the ‘normal’ state:

protected async override void OnPointerExited(PointerRoutedEventArgs e)

		await Task.Delay(100);

	VisualStateManager.GoToState(this, "Normal", true);

From now on, I will post in this blog instead of the expediteapps blog


After winning the local prize of Megathon last year and after wining the AppCampus grant, we create a company in Spain, Expediteapps, with the purpose to put all the effort to create


This is a new app for Windows phone, that we make with the highest level of a WP8 app can have, some of the features are:

  • Create a trip selecting our list of destinations or in map
  • Select the best places you find to create your trip‏ depending your likes.
  • Easily visually organize your places in days.
  • Ask to local people near to the places any doubt to prepare your trip.
  • Indeed you can ask translated with our cloud translation platform.
  • Download your trip to enjoy it in offline mode.
  • Help the community with your photos, tips, reviews, and answering questions and the community will refund with theirs.
  • Share and publish your trips to help the community to travel easy enjoying the best of destination.
  • With your progress and effort get achievements as prizes.
  • Get notifications to keep you trip updated and to answer the community.
  • Trip animated map with routes and places to easily arrive to places.
  • Photo gallery and panorama viewer.

Travel around the world with Tripnative on your trips and getaways with its map,street guide, packages and the places list.

Hello world, Cerbuino bee

After receiving the FEZ Cerbuino Bee from the Megathon,I decided to do not store it and make my first hello world, I have to say that there is not a lot of specific information about this board because I think is an upgrade of previous versions and the examples are old. Anyway digging a lot I find the way to start working with the pins.

Before start, know that the latest version (VS2012 and .NETMF 4.3) does not work, you need Visual Studio 2010 express and .net microframework 4.2 RTM. Let’s go:

1.- Visual Studio 2010 Express (yes it is still available)

2.- You need the .net microframework 4.2

3.- And you have to register here and download GHI Software Package v4.2

4.- Now install in the same order, it takes me a lot to download everything.

5.- Let’s start Visual Studio, create a new project of .net gadgeeter 4.2

New project
New project

6.- Now in my case, I had to change the default board to the Cerduino Bee, is really easy just drag from the toolbox and it changes the references.

Cerbuino VS
Cerbuino VS

7.- And this is what it takes me more to find out, because the references of pins were not specified at any place, at the end they were in using GHI.OSHW.Hardware. and here the code, now you can access to any of the pins

using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;
using GHI.OSHW.Hardware;
using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Microsoft.SPOT.Hardware;

namespace GadgeteerApp1
    public partial class Program
        // This method is run when the mainboard is powered up or reset.
        OutputPort port = null;
        void ProgramStarted()
            GT.Timer timer = new GT.Timer(1000); // every second (1000ms)
                timer.Tick +=new GT.Timer.TickEventHandler(timer_Tick);

            port = new OutputPort(FEZCerbuino.Pin.Digital.D0, false);
            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");

        bool ison = true;
        void timer_Tick(GT.Timer timer)
            if (port != null)
                ison = !ison;

And that’s all now you have the mainboard LED and the external LED ready, they recommend to use the LED with an 100ohm resistor, so my next goal is make an infrared barrier.

We won the local prize of Megathon! now let’s go for the Main prize.


Hello everyone, after a non-stop weekend Ciani and me developed a new app for the Megathon using all the stuff I have learned, OAuth, Foursquare calls, MVVM, Great User Controls, Several Restful calls, Bing Maps, an a great design very clean. I comment you several tips if you are going to participate in a weekend event. We were two (A,B) and we have the beginning of the idea so:

1.- Start making sketches in paper, a lot a lot. (In group)
2.- Make stuff in inkscape, like design of controls , mockups of pictures, pages and the navigation. (A)
* Learn to trace bitmaps fast and create vectors.
* Copy them to expression studio and then paste to visual studio
* Doing this you will not have weird things in data and canvas.left and top.
3.- Get a lot of metro icons from the internet, and small pictures that can mock up until you have urls, all you can, because you do not know when you are going to need them. (A)
4.- Meanwhile A do all of this, B makes the data model, creates the database, in our case we read using a Restful client, and then fill in the database.
* After that copy the database and use it like content (in our case SQLite).
5.- REST**********************
6.- Let’s start creating usercontrols based on the design you made in inkscape, in my pov is faster than create templates and more for a weekend app. (A)
7.- Meanwhile B creates the MVVM folders, and codes views, vm and models.
8.- When the mainpage and mainviewmodel is defined let’s finish it, because it will be the first impression of your app, and W8 can have a really great visual impact. Add topappbar, bottomappar, define controls.
* You have to dominate contextmenu, if you have not experience with clipping, take a look to animate the context menu.
9.- Now you have something to show. Let’s begin with the second layer of pages A, and B takes care of the third layer of pages.
10.- Do not overload yourself with orientations, resolutions, and the required contracts and stuff that are not idea oriented, of course every app needs them to be certified but now the app must show representation of the ideas.
11.- Your projects needs in-app, contracts, UI response, online to be a great idea. learn all about them before start.
12.- And the last one, change the color and the icon of the app.(We did it in our last 5 minutes).

I would like to make an article on how to do a weekend idea app with more detail but now We have to develop two projects, so it will have to wait. I hope it helps you in any event in your country.

the local prize was a Cerduino bee, that I am feeling like starting to improve several projects when I was studying my degree.

MyTimetable 3.0

Yesterday I released the new version of MyTimetable for Windows Phone. From the pov of the user it has great features, like 6 timetables, detailed list view, SkyDrive integration (with the W8 version I am developing) and an interface that I consider is the easiest to use, and it has live tiles, reminders and now more colorful. From the dev pov, I have to say that the SkyDrive API is both great and a bit hard to use because of capturing all the ids for folders and files. It took me three full days to create the new update. My main idea was simply just remove the smaato ad system, it is not working at all (at least in my case) and place the MS Ad Control. Let’s see what happens after the release appears in the marketplace. Now is getting from 10 to 30 daily downloads, and I hope that now the app is really great and Windows Phone is growing the app spreads a lot. If you have any suggestion to this app or any other, welcome your replies. and here some screenshots. (Just for the colors in your phone it worth for it).

img0 - Copy

img1 - Copy

img3 - Copy



Finally I have published my first game for Windows 8 Store: AnimalCards, I thinks is the best card game because I have analyzed the IOS and Android games and I have improved all of them. Try it and tell me what you think.

Match all cards you can because tic-tac and there are coming more and more levels!. Relax with mini games and show the world who is the best with leaderboards. Enjoy getting achievements, objectives and power ups. With bonus for kids like create your wallpaper and print the cards
  • Memory – Increasing difficulty to the limits.
  • Mini games – Enjoy playing when you have just five minutes.
  • Wallpapers – Pick a picture and create a great collage with all animals you want.

Hope you enjoy it!

Achtung WP7 issue with the toolkit

After several weeks, after being updated to, there was an issue with XAP processing failed.

Elgris found the solution of that, removing the reference of Microsfot.Controls.Toolkit and adding it then from Nuget package, it worked like a charm.

My headaches finished, so now let’s check the new ad system because smaato is on holidays or is not very profitable. THANK YOU elgris.