Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/GitHub.Resources/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/GitHub.Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ https://git-scm.com/download/win</value>
<value>Private Repository</value>
</data>
<data name="localPathText" xml:space="preserve">
<value>Local path</value>
<value>Local path:</value>
</data>
<data name="licenseListText" xml:space="preserve">
<value>License</value>
Expand Down Expand Up @@ -878,4 +878,4 @@ https://git-scm.com/download/win</value>
<data name="RepositorySelectContributedRepositories" xml:space="preserve">
<value>Contributed to repositories</value>
</data>
</root>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
Background="{DynamicResource {x:Static vs:EnvironmentColors.ToolWindowBackgroundBrushKey}}"
Foreground="{DynamicResource {x:Static vs:EnvironmentColors.ToolWindowTextBrushKey}}"
Margin="12,12"
mc:Ignorable="d" d:DesignHeight="414" d:DesignWidth="440">
<d:DesignData.DataContext>
<ghfvs:RepositoryCloneViewModelDesigner/>
Expand All @@ -19,35 +20,36 @@
</Control.Resources>

<DockPanel>
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Right" Margin="0,18,0,0">
<Button
Margin="12"
HorizontalAlignment="Center"
IsDefault="True"
Command="{Binding Clone}"
Content="Clone"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.CloneRepositoryButton}"/>
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.CloneRepositoryButton}"
KeyboardNavigation.TabIndex="5" />

<Button
Margin="12"
Margin="6,0,0,0"
HorizontalAlignment="Center"
IsDefault="True"
Command="{Binding Open}"
Content="Open"
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.OpenRepositoryButton}"/>
AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.OpenRepositoryButton}"
KeyboardNavigation.TabIndex="6"/>
</StackPanel>

<DockPanel DockPanel.Dock="Bottom"
Margin="16">
<Label DockPanel.Dock="Left" Content="{x:Static ghfvs:Resources.localPathText}"/>
<DockPanel DockPanel.Dock="Bottom" Margin="0,9,0,0">
<Label DockPanel.Dock="Left" Content="{x:Static ghfvs:Resources.localPathText}" />
<Button DockPanel.Dock="Right"
Command="{Binding Browse}"
Style="{DynamicResource GitHubLinkButton}"
VerticalContentAlignment="Center">
Browse
VerticalContentAlignment="Center"
KeyboardNavigation.TabIndex="4">
Browse...
</Button>
<TextBox Text="{Binding Path, UpdateSourceTrigger=PropertyChanged}"
VerticalContentAlignment="Center" />
<TextBox Text="{Binding Path, UpdateSourceTrigger=PropertyChanged}" Margin="6,0"
VerticalContentAlignment="Center"
KeyboardNavigation.TabIndex="3" />
</DockPanel>

<uic:InfoPanel Message="{Binding PathWarning}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@
</Control.Resources>

<DockPanel>
<ghfvs:PromptTextBox DockPanel.Dock="Top"
Margin="0,4"
PromptText="Search or enter a URL"
Text="{Binding Filter, UpdateSourceTrigger=PropertyChanged, Delay=300}"/>
<ghfvs:PromptTextBox Name="SearchTextBox"
DockPanel.Dock="Top"
Margin="0,9"
PromptText="Search or enter a URL"
Text="{Binding Filter, UpdateSourceTrigger=PropertyChanged, Delay=300}"
KeyboardNavigation.TabIndex="1" />

<Grid>
<ListView BorderThickness="0"
ItemsSource="{Binding ItemsView}"
SelectedItem="{Binding SelectedItem}"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.IsVirtualizingWhenGrouping="True">
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
KeyboardNavigation.TabIndex="2">
<ListView.GroupStyle>
<GroupStyle>
<GroupStyle.HeaderTemplate>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using System.ComponentModel.Composition;
using System;
using System.ComponentModel.Composition;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Threading;
using GitHub.Exports;
using GitHub.ViewModels.Dialog.Clone;

Expand All @@ -13,6 +15,16 @@ public partial class SelectPageView : UserControl
public SelectPageView()
{
InitializeComponent();

// See Douglas Stockwell's suggestion:
// https://social.msdn.microsoft.com/Forums/vstudio/en-US/30ed27ce-f7b7-48ae-8adc-0400b9b9ec78
IsVisibleChanged += (sender, e) =>
{
if (IsVisible)
{
Dispatcher.BeginInvoke(DispatcherPriority.Input, (Action)(() => SearchTextBox.Focus()));
}
};
}

protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
Expand Down