marcofolio.net - Archives (avril 2018)

design, jquery, programming, webdevelopment, fun, php, html, css, javascript

Le: 12 04 2018 à 15:18 Auteur: Marco

Just like with the Colorful rating system, the inspiration for this demo was a blog post I wrote almost 8 (!) years ago. The article called “Lights Off – A puzzle game using HTML5 canvas” was essentially a clone of Lights Off, but built using the HTML <canvas>-element. Lights Off is a clone itself, based on the 1995 game Lights Out by Tiger Electronics. For today, I’ll show you how to create a clone of this puzzle game using Xamarin.Forms. Can you solve the puzzle? Simply click on a tile to flip it along with the four adjacent tiles. Source If you’re like me, you can’t wait for the Marvels Avengers: Infinity War movie to hit the cinemas. Because it’ll be in theaters April 27th, I’ve given this sample a slight Avenger-theme! Let’s dive in. The idea I named the game XamLights (short for Xamarin Lights Out). The idea is exactly the same as the canvas-version. We’ll start off by creating the playing field using a Grid. This Grid will have a 5×5 dimension filled with tiles which we’ll get back to later. Next, we’ll need to apply logic for flipping the tiles. As you can see in the example,

The post How to build a “Lights Out” puzzle clone with Xamarin.Forms appeared first on Marcofolio.net.

Le: 04 04 2018 à 15:54 Auteur: Marco

Using inline icons on the web with CSS is already used a lot. The Bootstrap framework dropped their Glyphicons from version 4 and up, but does give some guidance for using other external icon libraries. With SkiaSharp, you can use the power of the Skia Graphics Library in your Xamarin.Forms application. One of their extensions called Iconify allows you to use inline icons just like with CSS. Let’s see how we can add this to your Xamarin.Forms app. Using Iconify is incredibly easy using templated strings. It has support for libraries like Font Awesome, IonIcons and much more. You can view the source on Github if you directly want to dive into the code. Otherwise, read on and learn how to use inline icons in Xamarin.Forms with SkiaSharp Iconify. The setup In order to get started, I’ll be using the following setup: Visual Studio for Mac (VS for Windows would work too). A new, Blank Xamarin.Forms App References to the following NuGet packages from all your projects: SkiaSharp.Views.Forms to add Skia support to the Xamarin.Forms app. Any of the SkiaSharp.Extended.Iconify.* packages (depending on the icon set you want to use). In this demo, I’ll be using SkiaSharp.Extended.Iconify.FontAwesome to add Font

The post Use inline icons in Xamarin.Forms with SkiaSharp Iconify appeared first on Marcofolio.net.

Le: 02 04 2018 à 09:59 Auteur: Marco

Visual Studio App Center is constantly evolving and getting better. One of the things it can do, is send Push Notifications to your app in one, unified way. You can send notifications through the UI of VS App Center, but in most cases you’ll need to connect your back-end with their API. Since VS App Center follows the API-first philosophy, they have excellent documentation (and even Swagger) on how to implement Push Notifications through their API. Today, I wanted to share my experience and I’ll assume you already got your app ready to receive Push Notifications which can be easily tested through their UI. Let’s dive in! Important: As far as I could figure out, you can’t send Push Notifications through their API when it’s part of an Organization. Currently, Push is still in Preview so will probably be added in the future. API Token & Push values Head over to your settings to generate an API Token. Make sure it is set to Full Access and write down the generated key. In order to send the message to the app, we’ll need your {owner_name} and {app_name}. The easiest way to find these values is to open your app in

The post Push Notifications through the API of Visual Studio App Center appeared first on Marcofolio.net.