Skip to content

Instantly share code, notes, and snippets.

@kaesaecracker
Last active June 20, 2018 12:36
Show Gist options
  • Save kaesaecracker/6263ea05b71210cc4f86c77d67987eb6 to your computer and use it in GitHub Desktop.
Save kaesaecracker/6263ea05b71210cc4f86c77d67987eb6 to your computer and use it in GitHub Desktop.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<RootNamespace>EtoApplication</RootNamespace>
<PackageVersion>1.0</PackageVersion>
<Title>EtoApplication</Title>
<Copyright>Copyright © 2018</Copyright>
<Description>Description of EtoApplication</Description>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Eto.Forms" Version="2.4.1" />
<PackageReference Include="Eto.Platform.Gtk" Version="2.4.1" />
</ItemGroup>
</Project>
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EtoApplication", "EtoApplication.csproj", "{A0FD19D5-9A64-4457-98D3-20AB569C2488}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A0FD19D5-9A64-4457-98D3-20AB569C2488}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0FD19D5-9A64-4457-98D3-20AB569C2488}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0FD19D5-9A64-4457-98D3-20AB569C2488}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0FD19D5-9A64-4457-98D3-20AB569C2488}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
using System;
using Eto.Forms;
namespace EtoApplication
{
public class MainForm : Form
{
public MainForm()
{
Title = "My Eto Form";
Content = "Hello World";
Menu = new MenuBar
{
Items =
{
new ButtonMenuItem
{
Text = "Disabled",
Enabled = false,
Items =
{
new ButtonMenuItem
{
Text = "Cannot see this"
}
}
},
new ButtonMenuItem
{
Text = "Disabled but clickable",
Enabled = false,
Command = new Command((s, a) => MessageBox.Show("Disabled but clickable clicked"))
}
}
};
}
[STAThread]
static void Main(string[] args)
{
new Application(Eto.Platform.Detect).Run(new MainForm());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment