Explorar o código

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

Kenric Nugteren hai 1 ano
pai
achega
eec0a6e1db
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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()
         {