All Projects → michaeled → Uisleuth

michaeled / Uisleuth

Licence: mit
A Xamarin.Forms Inspector

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Uisleuth

Tabstrip
Tab Strip control for Xamarin.Forms
Stars: ✭ 25 (+19.05%)
Mutual labels:  xamarin, xamarin-forms
Realm Dotnet
Realm is a mobile database: a replacement for SQLite & ORMs
Stars: ✭ 927 (+4314.29%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.googlemaps
Map library for Xamarin.Forms using Google maps API
Stars: ✭ 483 (+2200%)
Mutual labels:  xamarin, xamarin-forms
Restaurant App
Restaurant App 🍔 is a sample open-source e-Commerce 🛒 application for ordering foods, powered by polyglot microservices architecture and cross-platform development including mobile and web
Stars: ✭ 471 (+2142.86%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.pancakeview
An extended ContentView for Xamarin.Forms with rounded corners, borders, shadows and more!
Stars: ✭ 744 (+3442.86%)
Mutual labels:  xamarin, xamarin-forms
Formswpflive
Live XAML development for Xamarin Forms Apps using WPF Backend.
Stars: ✭ 14 (-33.33%)
Mutual labels:  xamarin, xamarin-forms
Xf Material Library
A Xamarin Forms library for implementing Material Design
Stars: ✭ 537 (+2457.14%)
Mutual labels:  xamarin, xamarin-forms
Professionalcsharp7
Code samples for the book Professional C# 7 and .NET Core 2.0 (with updates for 2.1), Wrox Press
Stars: ✭ 403 (+1819.05%)
Mutual labels:  xamarin, xamarin-forms
Xamarinmediamanager
Cross platform Xamarin plugin to play and control Audio and Video
Stars: ✭ 647 (+2980.95%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms
Xamarin.Forms Official Home
Stars: ✭ 5,485 (+26019.05%)
Mutual labels:  xamarin, xamarin-forms
Essential Ui Kit For Xamarin.forms
Free and beautiful XAML template pages for Xamarin.Forms apps.
Stars: ✭ 780 (+3614.29%)
Mutual labels:  xamarin, xamarin-forms
Brainpowerapp
A visual memory training game, a mobile game made with Xamarin for both Android and IOS .
Stars: ✭ 17 (-19.05%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Bluetooth Le
Bluetooth LE plugin for Xamarin
Stars: ✭ 419 (+1895.24%)
Mutual labels:  xamarin, xamarin-forms
Reactiveui
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
Stars: ✭ 6,709 (+31847.62%)
Mutual labels:  xamarin, xamarin-forms
Hotreload
Xamarin.Forms XAML hot reload, live reload, live xaml
Stars: ✭ 407 (+1838.1%)
Mutual labels:  xamarin, xamarin-forms
Smarthotel360 Mobile
SmartHotel360 Mobile
Stars: ✭ 535 (+2447.62%)
Mutual labels:  xamarin, xamarin-forms
Gittrends
A iOS and Android app to monitor the views and clones of your GitHub repos
Stars: ✭ 388 (+1747.62%)
Mutual labels:  xamarin, xamarin-forms
Awesome Xamarin
A curated list of awesome Xamarin iOS/Android and Xamarin Forms bindings, ports, frameworks and much more!
Stars: ✭ 394 (+1776.19%)
Mutual labels:  xamarin, xamarin-forms
Docs Archive
Xamarin docs archive
Stars: ✭ 553 (+2533.33%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.artoolkit
Augmented Reality Toolkit for Xamarin Forms
Stars: ✭ 14 (-33.33%)
Mutual labels:  xamarin, xamarin-forms

UI Sleuth

A Xamarin.Forms Inspector

Download Desktop Client · Download NuGet Package · Installation Guide · Wiki


What is UI Sleuth?

UI Sleuth is a Xamarin.Forms debugging tool. If you’ve ever made a web site, it’s similar to Microsoft’s F12 tools or Chrome Developer Tools. You can use it to efficiently track down layout issues, prototype a new design, and remotely control a device.

Screenshots


Attached to Android tablet.


Inspecting a ViewModel

Overview

UI Sleuth is composed of two components: the desktop client and the design server. The desktop client communicates with your mobile app via WebSockets and a simple JSON protocol. The .NET library that you reference in your Xamarin.Forms application is a WebSocket server and workflow engine.

The workflow engine is implemented using a BlockingCollection that dispatches incoming messages to listeners, called Reactions. Once a request has been received, its serialized into the appropriate .NET type. Each request type is associated with a reaction. When the corresponding reaction is determined, its instantiated and invoked. The implementing reaction can read the incoming message, perform some behavior, and return a response to the client.

As an example, the following code is used to respond to a screenshot request from the desktop client.

1) Define the request and response types (server code)

namespace UISleuth.Messages
{
    internal class ScreenShotRequest : Request {}

    internal class ScreenShotResponse : Response
    {
        public byte[] Capture { get; set; }
    }
}

2) Create a custom reaction class (server code)

    internal class ScreenShotReaction : Reaction
    {
        protected override void OnExecute(UIMessageContext ctx)
        {
            var request = ctx.Get<ScreenShotRequest>();
            if (request == null) return;

            var screenshot = InspectorContainer.Current.Resolve<IScreenShot>();
            byte[] capture = null;

            Thread.Invoke(() =>
            {
                capture = screenshot.Capture();
            });

            ctx.SetResponse<ScreenShotResponse>(r =>
            {
                r.Capture = capture;
                r.Suggest<GetVisualTreeRequest>();
            });
        }
    }

3) Associate the request type to the reaction (server code)

Reaction.Register<ScreenShotRequest, ScreenShotReaction>();

4) Request a screenshot via WebSocket (client code)

websocket.send("{action: 'ScreenShotRequest'}");

The action property above matches the C# type name of ScreenShotRequest. Additional parameters can be present in this message. Utility methods exist to easily deserialize these messages into the appropriate .NET objects.

* Request types are optional. You may chose to send an OkResponse

Why WebSockets?

When this project started, Xamarin.Forms was a UI toolkit for iOS, Android, and Windows Phone apps only. I needed a simple, out of process way to communicate with external emulators and devices. WebSockets just made sense.

Now that we're seeing Xamarin.Forms target WPF, GTK#, and macOS a whole new level of possibilites for UI Sleuth are emerging. Let's imagine your new client wants to communicate with your Xamarin.Forms app via IPC instead of WebSockets for out-of-process communication. That's great; start by extending the InspectorSocket type and register it with the DI service.

Documentation

This project site is a work in progress. You can find all the documentation on the project's Wiki.

@mykldavis

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].