This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Eto.Forms; | |
using Eto.Drawing; | |
using EtoPill2.Resources; | |
namespace EtoPill2.Views | |
{ | |
public class ExpandableView : TableLayout | |
{ | |
readonly Panel content; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var binding = Binding.Property((MyModel m) => m.Color); | |
var grid = new GridView(); | |
grid.CellFormatting += (sender, e) => e.BackgroundColor = binding.GetValue(e.Item); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FsCombined | |
open System | |
open Eto.Forms | |
open Eto.Drawing | |
type MainForm() = | |
inherit Form() | |
do | |
base.Title <- "My Eto Form" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Eto.Forms; | |
using Eto.Drawing; | |
namespace MyApp1 | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
/* $type can be specified if loading json directly (without existing instance), but when loading from a specific instance (like this example) you omit it */ | |
Content: { | |
$type: "TabControl", | |
Pages: [ | |
{ | |
Text: "Table Layout & Controls", | |
Content: { | |
$type: "TableLayout", | |
Padding: "30", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Runtime.Serialization; | |
namespace Eto.Drawing | |
{ | |
[Serializable] | |
public class SerializableBitmap : Eto.Drawing.Bitmap, ISerializable | |
{ | |
static System.IO.Stream Init(System.IO.Stream s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestForm : Form | |
{ | |
TextArea messagesBox; | |
TextBox messageEntryBox; | |
Button sendButton; | |
public TestForm() | |
{ | |
ClientSize = new Size(400, 300); | |
messagesBox = new TextArea { ReadOnly = true }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Eto.Forms; | |
using Eto.Drawing; | |
namespace Eto.Test | |
{ | |
public class PropertyLayout : Panel | |
{ | |
readonly DynamicLayout layout; | |
DynamicTable currentTable; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.ObjectModel; | |
using Eto.Drawing; | |
using System.ComponentModel; | |
namespace Eto.Forms | |
{ | |
/// <summary> | |
/// Alignment for child controls of the <see cref="StackLayout"/>. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyForm : Form | |
{ | |
public MyForm() | |
{ | |
ClientSize = new Size(200, 200); | |
Content = new StackLayout | |
{ | |
Orientation = Orientation.Vertical, | |
ContentAlign = StackLayoutAlign.Center, | |
Spacing = 10, |