From ff03f75e02af643215d74fa7c99cdc983e048ce7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Sat, 16 Jan 2021 10:32:53 +0100 Subject: simple label base --- Samples/common/SampleBase.cs | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'Samples/common/SampleBase.cs') diff --git a/Samples/common/SampleBase.cs b/Samples/common/SampleBase.cs index bdc6608b..cb24dad6 100644 --- a/Samples/common/SampleBase.cs +++ b/Samples/common/SampleBase.cs @@ -39,7 +39,21 @@ namespace Crow VerticalAlignment currentVAlign; DirectoryInfo curDir = new DirectoryInfo (Path.GetDirectoryName (Assembly.GetEntryAssembly ().Location)); - public FileSystemInfo[] CurDirectory => curDir.GetFileSystemInfos (); + public FileSystemInfo[] CurDirectory => curDir.GetFileSystemInfos (); + public string MultilineText = + $"Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit. Sed non risus.\n\nSuspendisse lectus tortor,"; + //public string MultilineText = $"a\n"; + TextAlignment textAlignment = TextAlignment.Left; + public TextAlignment TextAlignment { + get => textAlignment; + set { + if (textAlignment == value) + return; + textAlignment = value; + NotifyValueChanged (textAlignment); + } + } + public int IntValue { get => intValue; set { @@ -248,11 +262,11 @@ namespace Crow boolVal = value; NotifyValueChanged (boolVal); } - } + } - #endregion + #endregion - protected override void OnInitialized () + protected override void OnInitialized () { Commands = new List { new Command(() => MessageBox.ShowModal(this, MessageBox.Type.Information, "context menu 1 clicked")) { Caption = "Action 1" }, -- cgit v1.3.1-4-g156e