Giter Site home page Giter Site logo

twincat-wpf-boilerplate's Introduction

twincat-wpf-boilerplate

an hackable template for building fabulous wpf hmi with twincat

.NET Core Build

Main features

  • ✔️ An easy-to-use alternative to other Beckhoff HMI engines (web or plc based)
  • ✔️ runs on every network connected device
  • ✔️ Professional application (Embedded Database, cleaned architecture, open source)
  • ✔️ Low code and XAML based: get nice usable dashboards in seconds only with XAML design
  • ✔️ Fully hackable, customizable and extendable with c#

Example

Quickstart

Create your application

  1. Install the template via console or powershell
dotnet new --install TwincatWpfHMI.template
  1. Create your application with name MyFancyHMI
dotnet new tchmi -n MyFancyHMI -o MyFancyWorkingDirectory

Design your HMI in XAML

With included controls

todo

With your custom controls

Create new user controls by:

  • creating your custom controls and view models in WpfApp.Gui\View and WpfApp.Gui\ViewModels
  • implementing PlcUserControl in XAML and in code-behind
  • adding one of the included DataContext (DataContext="{Binding PlcVariableViewModel, Source={StaticResource Locator}}")

XAML (.xaml)

<basics:PlcUserControl x:Class="WpfApp.Gui.Views.Basics.PlcVariableView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:WpfApp.Gui.Views"
             xmlns:basics="clr-namespace:WpfApp.Gui.Views.Basics"
             DataContext="{Binding PlcVariableViewModel, Source={StaticResource Locator}}"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <StackPanel>
        <!-- add your stuff here -->
        <Label Content="{Binding VariablePath}" />
        <Label Content="{Binding RawValue}" />
    </StackPanel>
</basics:PlcUserControl>

Code-behind (xaml.cs)

public partial class PlcVariableView : PlcUserControl
{
    public PlcVariableView()
    {
        InitializeComponent();
    }
}

Run the application

todo

twincat-wpf-boilerplate's People

Contributors

fbarresi 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.