Flow.Launcher/Plugins/Flow.Launcher.Plugin.Calculator/Views/CalculatorSettings.xaml

73 lines
3 KiB
Text
Raw Normal View History

2021-12-15 04:51:39 +00:00
<UserControl
2024-05-25 06:35:14 +00:00
x:Class="Flow.Launcher.Plugin.Calculator.Views.CalculatorSettings"
2021-12-15 04:51:39 +00:00
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2024-05-25 06:35:14 +00:00
xmlns:calculator="clr-namespace:Flow.Launcher.Plugin.Calculator"
2022-12-21 07:51:17 +00:00
xmlns:core="clr-namespace:Flow.Launcher.Core.Resource;assembly=Flow.Launcher.Core"
2021-12-15 04:51:39 +00:00
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="clr-namespace:Flow.Launcher.Infrastructure.UI;assembly=Flow.Launcher.Infrastructure"
2024-05-25 06:35:14 +00:00
xmlns:viewModels="clr-namespace:Flow.Launcher.Plugin.Calculator.ViewModels"
2021-12-15 04:51:39 +00:00
d:DesignHeight="450"
d:DesignWidth="800"
Loaded="CalculatorSettings_Loaded"
mc:Ignorable="d">
<UserControl.Resources>
2021-12-15 04:51:39 +00:00
<core:LocalizationConverter x:Key="LocalizationConverter" />
</UserControl.Resources>
<Grid Margin="{StaticResource SettingPanelMargin}">
2020-04-30 21:39:49 +00:00
<Grid.RowDefinitions>
2021-12-15 04:51:39 +00:00
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
2020-04-30 21:39:49 +00:00
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
2021-12-15 04:51:39 +00:00
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="3*" />
2020-04-30 21:39:49 +00:00
</Grid.ColumnDefinitions>
2021-12-15 04:51:39 +00:00
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
2021-12-15 04:51:39 +00:00
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_calculator_output_decimal_seperator}" />
<ComboBox
x:Name="DecimalSeparatorComboBox"
Grid.Row="0"
Grid.Column="1"
MaxWidth="300"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
2021-12-15 04:51:39 +00:00
HorizontalAlignment="Left"
VerticalAlignment="Center"
2021-12-15 04:51:39 +00:00
ItemsSource="{Binding Source={ui:EnumBindingSource {x:Type calculator:DecimalSeparator}}}"
SelectedItem="{Binding Settings.DecimalSeparator}">
2020-04-30 21:39:49 +00:00
<ComboBox.ItemTemplate>
<DataTemplate>
2021-12-15 04:51:39 +00:00
<TextBlock FontSize="14" Text="{Binding Converter={StaticResource LocalizationConverter}}" />
2020-04-30 21:39:49 +00:00
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
2021-12-15 04:51:39 +00:00
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
2021-12-15 04:51:39 +00:00
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource flowlauncher_plugin_calculator_max_decimal_places}" />
<ComboBox
x:Name="MaxDecimalPlaces"
Grid.Row="1"
Grid.Column="1"
Margin="{StaticResource SettingPanelItemRightTopBottomMargin}"
2021-12-15 04:51:39 +00:00
HorizontalAlignment="Left"
VerticalAlignment="Center"
2021-12-15 04:51:39 +00:00
ItemsSource="{Binding MaxDecimalPlacesRange}"
SelectedItem="{Binding Settings.MaxDecimalPlaces}" />
2020-04-30 21:39:49 +00:00
</Grid>
</UserControl>