Merge pull request #149 from noctwolf/upstream-master

pass the pr
This commit is contained in:
NaBian authored and GitHub committed 2019-08-16 23:29:15 +08:00
commit 3f32cf3571
1 file changed
+2 -9
@@ -213,15 +213,8 @@ namespace HandyControl.Controls
_panelPage.Children.Add(CreatePateButton());
}
if (index == -1)
{
if (count > 0)
{
var button = _panelPage.Children[0];
button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, button));
}
}
else if (index >= 0 && index < count)
if (index == -1 && count > 0) index = 0;
if (index >= 0 && index < count)
{
var button = _panelPage.Children[index];
button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent, button));