Ver código fonte

Added a SelectedTab property onto DynamicTabControl to fix the annoyance of casting

Kenric Nugteren 1 ano atrás
pai
commit
eec0a6e1db
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      inabox.wpf/DynamicGrid/DynamicTabControl.cs

+ 2 - 0
inabox.wpf/DynamicGrid/DynamicTabControl.cs

@@ -79,6 +79,8 @@ namespace InABox.DynamicGrid
             get => (bool)GetValue(CanCreateTabProperty);
             set => SetValue(CanCreateTabProperty, value);
         }
+
+        public DynamicTabItem? SelectedTab => (SelectedItem as DynamicTabItem)!;
         
         static DynamicTabControl()
         {