Permalink
Browse files

Merge pull request #784 from picoe/fix/wpf-textstepper-tabindex

Wpf: Fix TextStepper.TabIndex
  • Loading branch information...
2 parents aa6a395 + f261cc5 commit 6a2e43ee1c81ac03c289b164c6c7a1c3c37211bd @cwensley cwensley committed on GitHub Apr 21, 2017
@@ -40,6 +40,8 @@ public TextStepperHandler()
};
}
+ public override sw.FrameworkElement TabControl => WatermarkTextBox;
+
public override string PlaceholderText
{
get { return WatermarkTextBox.Watermark as string; }
@@ -1,4 +1,4 @@
-using Eto.Forms;
+using Eto.Forms;
using Eto.Drawing;
using Eto.Wpf.Drawing;
using swc = System.Windows.Controls;
@@ -48,10 +48,6 @@ public virtual Color TextColor
set { Control.Foreground = value.ToWpfBrush(Control.Foreground); }
}
- public override int TabIndex
- {
- get { return Control.TabIndex; }
- set { Control.TabIndex = value; }
- }
+ public override sw.FrameworkElement TabControl => Control;
}
}
@@ -1,4 +1,4 @@
-using System;
+using System;
using Eto.Forms;
using Eto.Drawing;
using sw = System.Windows;
@@ -637,10 +637,11 @@ public Point Location
}
}
+ public virtual sw.FrameworkElement TabControl => ContainerControl;
public virtual int TabIndex
{
- get { return swi.KeyboardNavigation.GetTabIndex(ContainerControl); }
- set { swi.KeyboardNavigation.SetTabIndex(ContainerControl, value); }
+ get { return swi.KeyboardNavigation.GetTabIndex(TabControl); }
+ set { swi.KeyboardNavigation.SetTabIndex(TabControl, value); }
}
public virtual IEnumerable<Control> VisualControls => Enumerable.Empty<Control>();

0 comments on commit 6a2e43e

Please sign in to comment.