Bladeren bron

Merge pull request #935 from patriksvensson/feature/GH-932

Add support for arbitrary data in views
Charlie Kindel 4 jaren geleden
bovenliggende
commit
10bde3496c
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. 6 0
      Terminal.Gui/Core/View.cs

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

@@ -170,6 +170,12 @@ namespace Terminal.Gui {
 		/// </summary>
 		/// </summary>
 		public Rune HotKeySpecifier { get => textFormatter.HotKeySpecifier; set => textFormatter.HotKeySpecifier = value; }
 		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 {
 		internal Direction FocusDirection {
 			get => SuperView?.FocusDirection ?? focusDirection;
 			get => SuperView?.FocusDirection ?? focusDirection;
 			set {
 			set {