浏览代码

Add support for arbitrary data in views

Closes #932
Patrik Svensson 4 年之前
父节点
当前提交
00456a4ee7
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Terminal.Gui/Core/View.cs

+ 6 - 0
Terminal.Gui/Core/View.cs

@@ -170,6 +170,12 @@ namespace Terminal.Gui {
 		/// </summary>
 		public Rune HotKeySpecifier { get => textFormatter.HotKeySpecifier; set => textFormatter.HotKeySpecifier = value; }
 
+		/// <summary>
+		/// Gets or sets arbitrary data for the view.
+		/// </summary>
+		/// <remarks>This property is not used internally.</remarks>
+		public object Data { get; set; }
+
 		internal Direction FocusDirection {
 			get => SuperView?.FocusDirection ?? focusDirection;
 			set {