Convert Figma logo to code with AI

picoe logoEto

Cross platform GUI framework for desktop and mobile applications in .NET

3,778
339
3,778
346

Top Related Projects

1,364

A cross-platform UI toolkit for creating desktop applications with .NET and Mono

27,472

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology

Windows Forms is a .NET UI framework for building Windows desktop applications.

7,228

WPF is a .NET Core UI framework for building Windows desktop applications.

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.

22,629

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.

Quick Overview

Eto is a cross-platform GUI framework that allows developers to create desktop applications that run on multiple operating systems, including Windows, macOS, and Linux. It provides a consistent and native-looking user interface across different platforms, making it easier to develop and maintain applications that need to run on multiple systems.

Pros

  • Cross-Platform Compatibility: Eto supports multiple operating systems, allowing developers to create applications that can run on Windows, macOS, and Linux without the need for significant platform-specific code.
  • Native Look and Feel: Eto applications integrate seamlessly with the native UI elements of the host operating system, providing a familiar and intuitive user experience.
  • Extensive API: Eto offers a comprehensive API that covers a wide range of GUI components and functionality, making it easier to build complex desktop applications.
  • Active Development and Community: The Eto project is actively maintained, with regular updates and a growing community of contributors and users.

Cons

  • Learning Curve: Developers new to Eto may need to invest time in learning the framework's API and best practices, which can be a barrier to entry.
  • Limited Documentation: While the Eto project has documentation, it may not be as comprehensive or up-to-date as some developers would prefer.
  • Performance Concerns: Depending on the complexity of the application, Eto's cross-platform nature may result in some performance overhead compared to native GUI frameworks.
  • Limited Third-Party Integration: The availability of third-party libraries and tools that integrate with Eto may be more limited than for some other GUI frameworks.

Code Examples

Here are a few examples of how to use Eto in your code:

Creating a Simple Window

var app = new Application();
var window = new Window
{
    Title = "Hello, Eto!",
    ClientSize = new Size(400, 300)
};

var label = new Label { Text = "Welcome to Eto!" };
window.Content = label;

app.Run(window);

This code creates a simple window with a label that displays the text "Welcome to Eto!".

Adding a Button and Event Handler

var app = new Application();
var window = new Window
{
    Title = "Button Example",
    ClientSize = new Size(400, 300)
};

var button = new Button { Text = "Click Me" };
button.Click += Button_Click;
window.Content = button;

app.Run(window);

private static void Button_Click(object sender, EventArgs e)
{
    MessageBox.Show("You clicked the button!");
}

This example adds a button to the window and attaches a click event handler that displays a message box when the button is clicked.

Using a TreeView

var app = new Application();
var window = new Window
{
    Title = "TreeView Example",
    ClientSize = new Size(400, 300)
};

var treeView = new TreeView();
var root = treeView.Nodes.Add("Root");
root.Nodes.Add("Child 1");
root.Nodes.Add("Child 2");
root.Nodes.Add("Child 3");
window.Content = treeView;

app.Run(window);

This code creates a simple tree view with a root node and three child nodes.

Getting Started

To get started with Eto, follow these steps:

  1. Install the Eto.Forms NuGet package in your .NET project.
  2. Create a new Application instance and a Window instance.
  3. Add your GUI components (e.g., labels, buttons, tree views) to the window's content.
  4. Call the Run method on the Application instance to start the application.

Here's an example of a basic "Hello, World!" application using Eto:

var app = new Application();
var window = new Window
{
    Title = "Hello, Eto!",
    ClientSize = new Size(400, 300)
};

var label = new Label { Text = "Hello, World!" };
window.Content = label;

app.Run(window);

For more advanced usage and customization, refer to the Eto documentation and explore the available

Competitor Comparisons

1,364

A cross-platform UI toolkit for creating desktop applications with .NET and Mono

Pros of Xwt

  • Xwt is a cross-platform UI toolkit that supports multiple backends, including GTK, WinForms, and Cocoa, allowing for greater flexibility in application development.
  • Xwt has a larger community and more active development compared to Eto, with more contributors and a longer history.
  • Xwt provides a more comprehensive set of UI controls and features, making it suitable for building complex applications.

Cons of Xwt

  • Xwt has a steeper learning curve compared to Eto, as it has a more complex API and requires a deeper understanding of the underlying UI frameworks.
  • Xwt may have more dependencies and a larger footprint compared to Eto, which can be a concern for smaller or resource-constrained applications.
  • Xwt's support for newer UI technologies and frameworks may lag behind Eto, which is more focused on modern web-based UI development.

Code Comparison

Eto:

var app = new Application();
var window = new Window { Title = "Hello, Eto!" };
window.Content = new Label { Text = "Hello, Eto!" };
window.Show();
app.Run();

Xwt:

var app = new Application();
var window = new Window { Title = "Hello, Xwt!" };
window.Content = new Label { Text = "Hello, Xwt!" };
window.ShowAll();
app.Run();

The code snippets demonstrate the basic setup and usage of both Eto and Xwt, creating a simple window with a label. The main differences are in the method names (e.g., Show() vs. ShowAll()) and the overall API structure, which reflects the different design approaches of the two libraries.

27,472

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology

Pros of Avalonia

  • More modern and feature-rich UI framework with XAML-based design
  • Stronger community support and more frequent updates
  • Better cross-platform performance, especially for desktop applications

Cons of Avalonia

  • Steeper learning curve for developers new to XAML
  • Larger application size due to more comprehensive feature set
  • Less mature mobile support compared to Eto

Code Comparison

Eto:

var button = new Button { Text = "Click Me" };
button.Click += (sender, e) => MessageBox.Show("Hello, Eto!");
Content = button;

Avalonia:

<Button Content="Click Me" Click="Button_Click"/>
private void Button_Click(object sender, RoutedEventArgs e)
{
    MessageBox.Show("Hello, Avalonia!");
}

Summary

Avalonia offers a more modern and feature-rich approach to cross-platform UI development, with stronger community support and better desktop performance. However, it comes with a steeper learning curve and larger application size. Eto, while simpler and more lightweight, may be preferable for smaller projects or those requiring extensive mobile support. The choice between the two depends on project requirements, developer expertise, and target platforms.

Windows Forms is a .NET UI framework for building Windows desktop applications.

Pros of WinForms

  • Extensive documentation and large community support
  • Native Windows look and feel with familiar controls
  • Mature and stable platform with long-term Microsoft backing

Cons of WinForms

  • Limited cross-platform capabilities
  • Older technology with less modern design patterns
  • More verbose code compared to newer frameworks

Code Comparison

WinForms:

public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
        Button button1 = new Button();
        button1.Text = "Click Me";
        this.Controls.Add(button1);
    }
}

Eto:

public class MainForm : Form
{
    public MainForm()
    {
        Title = "My Form";
        Content = new Button { Text = "Click Me" };
    }
}

Summary

WinForms offers a mature and well-supported platform for Windows desktop applications with a native look and feel. However, it lacks cross-platform capabilities and uses older design patterns. Eto, on the other hand, provides a more modern approach with cross-platform support but may have a smaller community and less extensive documentation. The code comparison shows that Eto tends to be more concise and uses a more modern syntax compared to WinForms.

7,228

WPF is a .NET Core UI framework for building Windows desktop applications.

Pros of WPF

  • Extensive documentation and large community support
  • Rich set of built-in controls and customization options
  • Powerful data binding and templating capabilities

Cons of WPF

  • Limited to Windows platforms
  • Steeper learning curve, especially for XAML
  • Heavier resource usage compared to lightweight alternatives

Code Comparison

WPF:

<Window x:Class="MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Button Content="Click Me" HorizontalAlignment="Center" VerticalAlignment="Center"/>
    </Grid>
</Window>

Eto:

public class MainForm : Form
{
    public MainForm()
    {
        Title = "My Form";
        ClientSize = new Size(400, 350);
        Content = new Button { Text = "Click Me" };
    }
}

WPF uses XAML for UI definition, while Eto uses a more code-centric approach. WPF offers more detailed control over layout and styling, but Eto's simplicity can lead to faster development for basic interfaces.

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.

Pros of Xamarin.Forms

  • Larger community and ecosystem, with more resources and third-party libraries available
  • Native UI controls for each platform, providing a more authentic look and feel
  • Stronger integration with platform-specific features and APIs

Cons of Xamarin.Forms

  • Steeper learning curve, especially for developers new to mobile development
  • Performance can be slower compared to native development, particularly for complex UIs
  • Limited control over platform-specific UI customization

Code Comparison

Xamarin.Forms:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MyApp.MainPage">
    <StackLayout>
        <Label Text="Welcome to Xamarin.Forms!" />
    </StackLayout>
</ContentPage>

Eto:

public class MainForm : Form
{
    public MainForm()
    {
        Title = "My Eto Form";
        Content = new Label { Text = "Welcome to Eto!" };
    }
}

The code comparison shows that Xamarin.Forms uses XAML for UI definition, while Eto uses a more code-centric approach. Xamarin.Forms provides a more declarative way of building UIs, which can be easier to read and maintain for complex layouts. Eto's approach is more straightforward and may be more familiar to developers coming from traditional desktop application development.

22,629

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.

Pros of MAUI

  • Backed by Microsoft, ensuring long-term support and frequent updates
  • Extensive documentation and large community support
  • Seamless integration with other .NET technologies and libraries

Cons of MAUI

  • Steeper learning curve for developers new to .NET ecosystem
  • Limited support for Linux desktop platforms
  • Larger application size compared to native solutions

Code Comparison

MAUI:

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MyApp.MainPage">
    <StackLayout>
        <Label Text="Welcome to .NET MAUI!" />
    </StackLayout>
</ContentPage>

Eto:

public class MainForm : Form
{
    public MainForm()
    {
        Title = "My Eto Form";
        Content = new Label { Text = "Welcome to Eto.Forms!" };
    }
}

Key Differences

  • MAUI uses XAML for UI design, while Eto primarily uses C# code
  • MAUI targets mobile and desktop platforms, Eto focuses on cross-platform desktop development
  • MAUI offers more built-in controls and features, Eto provides a lightweight alternative

Conclusion

MAUI is better suited for large-scale, multi-platform projects with mobile support, while Eto shines in cross-platform desktop applications with a smaller footprint and simpler architecture.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Eto.Forms

A cross platform desktop and mobile user interface framework

Build discussions Gitter wiki NuGet MyGet

Description

This framework can be used to build applications that run across multiple platforms using their native toolkit, with an easy to use API. This will make your applications look and work as a native application on all platforms, using a single UI codebase.

For advanced scenarios, you can take advantage of each platform's capabilities by wrapping your common UI in a larger application, or even create your own high-level controls with a custom implementations per platform.

This framework currently supports creating Desktop applications that work across Windows Forms, WPF, MonoMac, and GTK#. There is a Mobile/iOS port in the works, but is considered incomplete.

This framework was built so that using it in .NET is natural. For example, a simple hello-world application might look like:

using Eto.Forms;
using Eto.Drawing;

public class MyForm : Form
{
	public MyForm ()
	{
		Title = "My Cross-Platform App";
		ClientSize = new Size(200, 200);
		Content = new Label { Text = "Hello World!" };
	}
	
	[STAThread]
	static void Main()
	{
		new Application().Run(new MyForm());
	}
}

or in a F# script:

#load ".paket/load/eto.platform.windows.fsx"
// see https://fsprojects.github.io/Paket/paket-generate-load-scripts.html

open Eto.Drawing
open Eto.Forms

type MyForm() as this =
    inherit Form()
    do
        this.Title      <- "My Cross-Platform App"
        this.ClientSize <- Size (200, 200)
        this.Content    <- new Label(Text = "Hello F# World!")

Eto.Platform.Initialize(Eto.Platforms.WinForms)
let app = new Application()
let form = new MyForm()
form.Show()

Getting Started

To begin creating apps using Eto.Forms, follow the Quick Start Guide.

To compile or contribute to Eto.Forms, read the Contributing Guide.

Screenshots

Windows via WPF:

Mac via MonoMac:

Linux via GTK#3:

Applications

Third party libraries

Pure Eto.FormsSkiaSharp edition
ScottPlotpurePlotting library that makes it easy to interactively display large datasets.samplesample
LiveChartsskiaSimple, flexible, powerful and open source data visualization for .Net.samplesamplesample
MicrochartsskiaCreate elegant Cross-Platform simple charts.sample
OxyPlotpureskiaCross-platform plotting library for .NET.samplesamplesample
MapsuiskiaA C# map component for apps.samplesamplesample
LibVLCSharppureDisplay a video in an Eto app.samplesample
Eto.OpenTKpureOpenGL viewport control for Eto.Forms using OpenTK.
Eto.VeldridpureA control to embed the Veldrid graphics library in Eto.Forms.
Eto.CodeEditorpureA package that gives you a code editor control in Eto.Forms.
Eto.HtmlRendererpureProvides an Eto control to display HTML content.
Eto.RainbowLoadingpureskiaA control showing the Android loading indicator.sample
Eto.GifImageViewpureA control for displaying GIF's.sample
Eto.SkiaDrawpureA control enabling use of SkiaSharp in Eto.
Eto.ContainerspureSome extra Eto.Forms container controls.

👉 Note : Some packages are in the pipeline but will not appear until next release is created.

Assemblies

Your project only needs to reference Eto.dll, and include the corresponding platform assembly that you wish to target. To run on a Mac platform, you need to bundle your app.

  • Eto.dll - Eto.Forms (UI), Eto.Drawing (Graphics), and platform loading
  • Eto.Mac64.dll - Lightweight Mac platform using .NET 6+ or mono
  • Eto.macOS.dll - .NET 6+ platform for Mac (for use with the net6.0-macos target)
  • Eto.WinForms.dll - Windows Forms platform using GDI+ for graphics
  • Eto.Direct2D.dll - Windows Forms platform using Direct2D for graphics
  • Eto.Wpf.dll - Windows Presentation Foundation platform
  • Eto.Gtk.dll - Gtk+3 platform for Mac, Windows, and Linux.
  • Eto.iOS.dll - Xamarin.iOS platform
  • Eto.Android.dll - Xamarin.Android platform

Currently supported targets

  • OS X: MonoMac or net6.0-macos
  • Linux: GTK+ 3
  • Windows: Windows Forms (using GDI or Direct2D) or WPF

Under development

These platforms are currently incomplete or in development. Any eager bodies willing to help feel free to do so!

  • iOS using Xamarin.iOS
  • Android using Xamarin.Android (Eto.Android)