mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-01-14 01:25:38 -05:00
141 lines
8.5 KiB
XML
141 lines
8.5 KiB
XML
<Window x:Class="FeedCenter.Options.FeedWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:properties="clr-namespace:FeedCenter.Properties"
|
|
xmlns:feedCenter="clr-namespace:FeedCenter"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
d:DataContext="{d:DesignInstance Type=feedCenter:Feed}"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
|
xmlns:options="clr-namespace:FeedCenter.Options"
|
|
mc:Ignorable="d"
|
|
Title="FeedWindow"
|
|
Height="350"
|
|
Width="450"
|
|
WindowStartupLocation="CenterOwner"
|
|
Icon="/FeedCenter;component/Resources/Application.ico"
|
|
FocusManager.FocusedElement="{Binding ElementName=UrlTextBox}">
|
|
<Window.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
|
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
|
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.FlatButton.xaml" />
|
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/light.cobalt.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
<Grid Margin="6">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TabControl Name="OptionsTabControl"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
mah:HeaderedControlHelper.HeaderFontSize="16"
|
|
mah:TabControlHelper.Underlined="SelectedTabItem">
|
|
<TabItem Header="{x:Static properties:Resources.generalTab}">
|
|
<StackPanel Margin="0,4"
|
|
options:Spacing.Vertical="8">
|
|
<TextBox Name="UrlTextBox"
|
|
mah:TextBoxHelper.UseFloatingWatermark="True"
|
|
mah:TextBoxHelper.Watermark="{x:Static properties:Resources.feedUrlLabel}"
|
|
mah:TextBoxHelper.SelectAllOnFocus="True"
|
|
Text="{Binding Path=Source, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}" />
|
|
<TextBox Name="NameTextBox"
|
|
mah:TextBoxHelper.UseFloatingWatermark="True"
|
|
mah:TextBoxHelper.Watermark="{x:Static properties:Resources.feedNameLabel}"
|
|
mah:TextBoxHelper.SelectAllOnFocus="True"
|
|
Text="{Binding Path=Name, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}" />
|
|
<ComboBox Name="CategoryComboBox"
|
|
DisplayMemberPath="Name"
|
|
SelectedValuePath="Id"
|
|
SelectedValue="{Binding Path=CategoryId}"
|
|
mah:TextBoxHelper.UseFloatingWatermark="True"
|
|
mah:TextBoxHelper.Watermark="{x:Static properties:Resources.feedCategoryLabel}" />
|
|
|
|
<CheckBox Name="ReadIntervalCheckBox"
|
|
VerticalContentAlignment="Center"
|
|
IsChecked="{Binding Path=Enabled, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Label Content="{x:Static properties:Resources.feedReadIntervalPrefix}"
|
|
HorizontalAlignment="Left"
|
|
Margin="0,0,5,0"
|
|
VerticalAlignment="Center"
|
|
Padding="0" />
|
|
<mah:NumericUpDown Width="100"
|
|
Maximum="10080"
|
|
Minimum="1"
|
|
IsEnabled="{Binding ElementName=ReadIntervalCheckBox, Path=IsChecked}"
|
|
Value="{Binding CheckInterval, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}" />
|
|
<Label Content="{x:Static properties:Resources.feedReadIntervalSuffix}"
|
|
HorizontalAlignment="Left"
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Padding="0" />
|
|
</StackPanel>
|
|
</CheckBox>
|
|
</StackPanel>
|
|
</TabItem>
|
|
<TabItem Header="{x:Static properties:Resources.readingTab}">
|
|
<StackPanel Margin="0,4"
|
|
options:Spacing.Vertical="8">
|
|
<ComboBox Name="OpenComboBox"
|
|
SelectedValue="{Binding Path=MultipleOpenAction, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=true}"
|
|
SelectedValuePath="Tag"
|
|
mah:TextBoxHelper.UseFloatingWatermark="True"
|
|
mah:TextBoxHelper.Watermark="{x:Static properties:Resources.openLabel}">
|
|
<ComboBoxItem Content="{x:Static properties:Resources.openAllSingleToolbarButton}"
|
|
Tag="{x:Static feedCenter:MultipleOpenAction.SinglePage}" />
|
|
<ComboBoxItem Content="{x:Static properties:Resources.openAllMultipleToolbarButton}"
|
|
Tag="{x:Static feedCenter:MultipleOpenAction.IndividualPages}" />
|
|
</ComboBox>
|
|
</StackPanel>
|
|
</TabItem>
|
|
<TabItem Header="{x:Static properties:Resources.authenticationTab}">
|
|
<StackPanel Margin="0,4">
|
|
<CheckBox Content="{x:Static properties:Resources.requiresAuthenticationCheckBox}"
|
|
Margin="0,0,0,4"
|
|
Name="RequiresAuthenticationCheckBox"
|
|
IsChecked="{Binding Path=Authenticate, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}" />
|
|
<TextBox Name="AuthenticationUserNameTextBox"
|
|
Margin="25,0,0,4"
|
|
IsEnabled="{Binding ElementName=RequiresAuthenticationCheckBox, Path=IsChecked}"
|
|
mah:TextBoxHelper.UseFloatingWatermark="True"
|
|
mah:TextBoxHelper.Watermark="{x:Static properties:Resources.authenticationUserNameLabel}"
|
|
Text="{Binding Path=Username, UpdateSourceTrigger=Explicit, ValidatesOnExceptions=True}" />
|
|
<PasswordBox Name="AuthenticationPasswordTextBox"
|
|
Margin="25,0,0,8"
|
|
Style="{StaticResource MahApps.Styles.PasswordBox.Button.Revealed}"
|
|
mah:PasswordBoxBindingBehavior.Password="{Binding Password, UpdateSourceTrigger=Explicit, ValidatesOnDataErrors=True}"
|
|
mah:TextBoxHelper.UseFloatingWatermark="True"
|
|
mah:TextBoxHelper.Watermark="{x:Static properties:Resources.authenticationPasswordLabel}"
|
|
IsEnabled="{Binding ElementName=RequiresAuthenticationCheckBox, Path=IsChecked}" />
|
|
</StackPanel>
|
|
</TabItem>
|
|
</TabControl>
|
|
<StackPanel
|
|
Grid.Column="0"
|
|
Grid.Row="1"
|
|
Orientation="Horizontal"
|
|
Margin="0,5,0,0"
|
|
HorizontalAlignment="Right">
|
|
<Button Content="{x:Static properties:Resources.OkayButton}"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Width="75"
|
|
Margin="0,0,5,0"
|
|
IsDefault="True"
|
|
Click="HandleOkayButtonClick" />
|
|
<Button Content="{x:Static properties:Resources.CancelButton}"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Width="75"
|
|
IsCancel="True" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window> |