Flow.Launcher/Plugins/Flow.Launcher.Plugin.BrowserBookmark/Views/SettingsControl.xaml
2021-09-23 13:32:10 -05:00

71 lines
No EOL
4 KiB
XML

<UserControl x:Class="Flow.Launcher.Plugin.BrowserBookmark.Views.SettingsControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Background="White"
d:DesignHeight="300" d:DesignWidth="500"
DataContext="{Binding RelativeSource={RelativeSource Self}}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="80"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel>
<Grid Grid.Row="0" Margin="40 20 0 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="160" />
<ColumnDefinition Width="140"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_openBookmarks}"
FontSize="15" Margin="0 5 0 0"/>
<RadioButton Grid.Column="1" Name="NewWindowBrowser" GroupName="OpenSearchBehaviour"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_newWindow}"
Click="OnNewBrowserWindowClick" />
<RadioButton Grid.Column="2" Name="NewTabInBrowser" GroupName="OpenSearchBehaviour"
Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_newTab}"
Click="OnNewTabClick" />
</Grid>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Grid.Row="1" Height="60" Margin="25,13,0,0">
<Label Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_setBrowserFromPath}"
Height="28" Margin="10"/>
<TextBox x:Name="BrowserPathBox"
HorizontalAlignment="Left"
Height="30"
TextWrapping="NoWrap"
VerticalAlignment="Center"
Text="{Binding Settings.BrowserPath}"
Width="240"
Margin="10"/>
<Button x:Name="ViewButton" Content="{DynamicResource flowlauncher_plugin_browserbookmark_settings_choose}"
HorizontalAlignment="Left" Margin="10" Width="100" Height="30" Click="OnChooseClick" FontSize="14" />
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Vertical">
<TextBlock Text="CustomBrowsers" Margin="10"/>
<ListView Grid.Row="2" ItemsSource="{Binding Settings.CustomChromiumBrowsers}"
SelectedItem="{Binding SelectedCustomBrowser}"
Margin="10"
BorderBrush="DarkGray"
BorderThickness="1"
Style="{StaticResource {x:Static GridView.GridViewStyleKey}}"
Height="auto"
Name="CustomBrowsers"
MouseDoubleClick="MouseDoubleClickOnSelectedCustomBrowser">
<ListView.View>
<GridView>
<GridViewColumn DisplayMemberBinding="{Binding Name, Mode=OneWay}" Header="Browser Name"/>
<GridViewColumn DisplayMemberBinding="{Binding DataDirectoryPath, Mode=OneWay}" Header="DataDirectoryPath"/>
</GridView>
</ListView.View>
</ListView>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button Content="Add Custom Browser" Margin="10" Click="NewCustomBrowser"/>
<Button Content="Delete Custom Browser" Margin="10" Click="DeleteCustomBrowser"/>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>