Code Monkey home page Code Monkey logo

upbeatui's Introduction

UpbeatUI

License: MIT Nuget

UpbeatUI is an open-source lightweight MVVM framework for quickly developing mobile-style touch based Windows applications using Windows Presentation Foundation (WPF). It provides a simple API for stacking Views in the Z-Axis where only the top View is active to the user. The user can close the active view (remove it from the top of the stack) by tapping/clicking the surrounding background area. UpbeatUI also includes versions of several standard MVVM objects and base classes.

UpbeatUI supports .NET Core 3.0, .NET Core 3.1, .NET 5, .NET 6, .NET 7, and .NET 8.

Please note that UpbeatUI is fairly new and may have unidentified bugs or performance inefficiencies. Please see the Contributing section for information on how to help make UpbeatUI better. See the To-Do List for planned future work.

Installation

UpbeatUI implementations are available as NuGet packages:

  • Nuget - UpbeatUI: Basic implementation requiring manual setup and teardown.
  • Nuget - UpbeatUI.Extensions.DependencyInjection: An implementation integrated with Microsoft.Extensions.DependencyInjection (IServiceProvider) that provides dependency injection capabilities and automatic Parameters-ViewModel-View mapping via naming convention.
  • Nuget - UpbeatUI.Extensions.Hosting: An implementation integrated with Microsoft.Extensions.Hosting (IHostBuilder) for easy setup and automatic teardown.

Examples

Three samples are included: one showing manual setup and teardown without dependency injection, one showing manual setup and teardown with dependency injection using an IServiceProvider, and one showing automatic setup and teardown using an IHostBuilder. All samples demonstrate the following capabilities:

UpbeatUI Sample

How UpbeatUI Works

There are two central components of UpbeatUI: The first is the UpbeatStack class. It is responsible for managing the stack of open ViewModels and also maintaining mappings between ViewModelParameters and ViewModels. The second is the IUpbeatService interface which provides ViewModels with methods and properties for interacting with their parent UpbeatStack. For example, the IUpbeatService has methods for opening a new ViewModel on top of the stack. The UpbeatStack provides a unique IUpbeatService to each ViewModel.

Opening a new ViewModel is done by passing a ViewModelParameters object to the OpenViewModel or OpenViewModelAsync method on the UpbeatStack or IUpbeatService. A ViewModelParameters object contains initialization data for a ViewModel. There must be a unique ViewModelParameters class for each ViewModel class, as the UpbeatStack relies on mappings between Types to create ViewModels and thus display Views.

How to use UpbeatUI

Please see the separate How To Use markdown file for a guide to the basic features in UpbeatUI.

To-Do List

Contributing

Additions, bug fixes, and performance improvements are welcome. For larger modifications please open an issue to discuss the changes.

Editing

Recommended code editor is VS Code. If using VS Code, please open the repository through the upbeatui.code-workspace file. This will ensure that certain formatting settings are applied. The following VS Code extensions are recommended:

  1. EditorConfig for VS Code
  2. Prettier - Code formatter
  3. .NET Core Test Explorer
  4. C#
  5. PowerShell
  6. XML

Building/Running

This project defines tasks for executing builds, tests, and other common actions using the Invoke-Build tool for PowerShell. To install Invoke-Build, visit their GitHub page: nightroman/Invoke-Build.

Submitting Changes

  • Submission must be your own work and releasable under the MIT license.
  • Please follow existing formatting and naming conventions (some areas may currently be inconsisent, so please ask for clarification if necessary).
  • Please include unit tests in the UpbeatUI.Tests project using NUnit.
  • Patches should be submitted as GitHub Pull Requests.

upbeatui's People

Contributors

lutzroeder avatar michaelpduda avatar tacixat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.