<Application xmlns="https://github.com/avaloniaui"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:dialoghostavalonia="using:DialogHostAvalonia"
			 xmlns:local="using:Progrart"
			 x:Class="Progrart.App"
			 RequestedThemeVariant="Default">
	<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
	<Application.Resources>
		<ResourceDictionary>
			<FontFamily x:Key="SarasaMonoSlabCLFont">avares://Progrart/Assets/Fonts#Sarasa Mono Slab CL</FontFamily>
			<x:Double x:Key="ScrollBarSize">7</x:Double>
			<ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown">
				<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
				<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
				<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
				<Setter Property="BorderBrush" Value="{DynamicResource TextControlBorderBrush}" />
				<Setter Property="MinHeight" Value="{DynamicResource TextControlThemeMinHeight}" />
				<Setter Property="MinWidth" Value="{DynamicResource TextControlThemeMinWidth}" />
				<Setter Property="Padding" Value="{DynamicResource TextControlThemePadding}" />
				<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
				<Setter Property="Template">
					<ControlTemplate>
						<DataValidationErrors>
							<ButtonSpinner Name="PART_Spinner"
										   Background="{TemplateBinding Background}"
										   BorderThickness="{TemplateBinding BorderThickness}"
										   BorderBrush="{TemplateBinding BorderBrush}"
										   CornerRadius="{TemplateBinding CornerRadius}"
										   IsTabStop="False"
										   Padding="0"
										   MinWidth="0"
										   MinHeight="0"
										   HorizontalContentAlignment="Stretch"
										   VerticalContentAlignment="Stretch"
										   AllowSpin="{TemplateBinding AllowSpin}"
										   ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"
										   ButtonSpinnerLocation="{TemplateBinding ButtonSpinnerLocation}">
								<TextBox Name="PART_TextBox"
										 Background="Transparent"
										 BorderBrush="Transparent"
										 Margin="-1"
										 Padding="{TemplateBinding Padding}"
										 MinWidth="0"
										 Foreground="{TemplateBinding Foreground}"
										 Watermark="{TemplateBinding Watermark}"
										 IsReadOnly="{TemplateBinding IsReadOnly}"
										 VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
										 HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
										 Text="{TemplateBinding Text}"
										 TextAlignment="{TemplateBinding TextAlignment}"
										 AcceptsReturn="False"
										 TextWrapping="NoWrap"
										 MinHeight="0"
										 InnerLeftContent="{Binding InnerLeftContent, RelativeSource={RelativeSource TemplatedParent}}"
										 InnerRightContent="{Binding InnerRightContent, RelativeSource={RelativeSource TemplatedParent}}"/>
							</ButtonSpinner>
						</DataValidationErrors>
					</ControlTemplate>
				</Setter>
			</ControlTheme>
			<ControlTheme x:Key="{x:Type ButtonSpinner}" TargetType="ButtonSpinner">
				<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
				<Setter Property="Padding" Value="10, 0" />
				<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
				<Setter Property="BorderBrush" Value="{DynamicResource TextControlBorderBrush}" />
				<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
				<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
				<Setter Property="MinHeight" Value="{DynamicResource TextControlThemeMinHeight}" />
				<Setter Property="MinWidth" Value="{DynamicResource TextControlThemeMinWidth}" />
				<Setter Property="HorizontalContentAlignment" Value="Stretch" />
				<Setter Property="VerticalContentAlignment" Value="Center" />
				<Setter Property="Focusable" Value="True"/>
				<Setter Property="Template">
					<ControlTemplate>
						<DataValidationErrors>
							<Border Background="{TemplateBinding Background}"
									BorderBrush="{TemplateBinding BorderBrush}"
									BorderThickness="{TemplateBinding BorderThickness}"
									CornerRadius="{TemplateBinding CornerRadius}"
									MinHeight="{TemplateBinding MinHeight}">
								<DockPanel>
									<StackPanel Name="PART_SpinnerPanel"
												TabIndex="2"
												DockPanel.Dock="Right"
												Orientation="Horizontal"
												IsVisible="{TemplateBinding ShowButtonSpinner}">
										<RepeatButton Name="PART_IncreaseButton"
													  IsTabStop="{TemplateBinding IsTabStop}"
													  Theme="{StaticResource FluentButtonSpinnerRepeatButton}"
													  Background="{TemplateBinding Background}"
													  BorderBrush="{TemplateBinding BorderBrush}"
													  BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ButtonSpinnerLeftThickness}}"
													  VerticalAlignment="Stretch"
													  VerticalContentAlignment="Center"
													  MinHeight="0"
													  Foreground="{TemplateBinding Foreground}"
													  MinWidth="34">
											<PathIcon Width="16"
													  Height="8"
													  Data="{StaticResource ButtonSpinnerIncreaseButtonIcon}" />
										</RepeatButton>

										<RepeatButton Name="PART_DecreaseButton"
													  IsTabStop="{TemplateBinding IsTabStop}"
													  Theme="{StaticResource FluentButtonSpinnerRepeatButton}"
													  Background="{TemplateBinding Background}"
													  BorderBrush="{TemplateBinding BorderBrush}"
													  BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource ButtonSpinnerLeftThickness}}"
													  VerticalAlignment="Stretch"
													  VerticalContentAlignment="Center"
													  MinHeight="0"
													  Foreground="{TemplateBinding Foreground}"
													  MinWidth="34">
											<PathIcon Width="16"
													  Height="8"
													  Data="{StaticResource ButtonSpinnerDecreaseButtonIcon}" />
										</RepeatButton>
									</StackPanel>

									<ContentPresenter Name="PART_ContentPresenter"
													  Grid.Column="1"
													  TabIndex="1"
													  ContentTemplate="{TemplateBinding ContentTemplate}"
													  Content="{TemplateBinding Content}"
													  HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
													  VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
													  Padding="{TemplateBinding Padding}" />
								</DockPanel>
							</Border>
						</DataValidationErrors>
					</ControlTemplate>
				</Setter>
				<Style Selector="^:left">
					<Style Selector="^ /template/ StackPanel#PART_SpinnerPanel">
						<Setter Property="DockPanel.Dock" Value="Left"/>
					</Style>
					<Style Selector="^ /template/ RepeatButton">
						<Setter Property="BorderThickness" Value="{TemplateBinding BorderThickness, Converter={StaticResource ButtonSpinnerRightThickness}}"/>
					</Style>
				</Style>
				<Style Selector="^:error">
					<Setter Property="BorderBrush" Value="{DynamicResource SystemErrorTextColor}" />
				</Style>
			</ControlTheme>
			<ControlTheme x:Key="{x:Type RadioButton}" TargetType="RadioButton">
				<Setter Property="Background" Value="{DynamicResource RadioButtonBackground}" />
				<Setter Property="Foreground" Value="{DynamicResource RadioButtonForeground}" />
				<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonBorderBrush}" />
				<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
				<Setter Property="Padding" Value="8,2" />
				<Setter Property="HorizontalAlignment" Value="Left" />
				<Setter Property="VerticalAlignment" Value="Center" />
				<Setter Property="HorizontalContentAlignment" Value="Left" />
				<Setter Property="VerticalContentAlignment" Value="Center" />
				<Setter Property="Template">
					<ControlTemplate TargetType="RadioButton">
						<Border
						Name="RootBorder"
						Background="{TemplateBinding Background}"
						BorderBrush="{TemplateBinding BorderBrush}"
						BorderThickness="{TemplateBinding BorderThickness}"
						CornerRadius="{TemplateBinding CornerRadius}">
							<Grid ColumnDefinitions="*">
								<Grid Height="{DynamicResource RadioButtonMinHeight}" VerticalAlignment="Top">

									<Border
									Name="OuterBorder"
									UseLayoutRounding="False" />

									<Border
									Name="CheckOuterBorder"
									Opacity="0"
									UseLayoutRounding="False" />

									<Border
									CornerRadius="12"
									Name="CheckGlyph"

									Background="#2288EE"
									Opacity="0"
									/>
								</Grid>

								<ContentPresenter
								Name="PART_ContentPresenter"
								Margin="{TemplateBinding Padding}"
								HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
								VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
								Content="{TemplateBinding Content}"
								ContentTemplate="{TemplateBinding ContentTemplate}"
								Foreground="{TemplateBinding Foreground}" />
							</Grid>
						</Border>
					</ControlTemplate>
				</Setter>

				<Style Selector="^ /template/ ContentPresenter#PART_ContentPresenter">
					<Setter Property="RecognizesAccessKey" Value="True" />
				</Style>

				<!--  PointerOver State  -->
				<Style Selector="^:pointerover /template/ ContentPresenter#PART_ContentPresenter">
					<Setter Property="Foreground" Value="{DynamicResource RadioButtonForegroundPointerOver}" />
				</Style>

				<Style Selector="^:pointerover /template/ Border#RootBorder">
					<Setter Property="Background" Value="{DynamicResource RadioButtonBackgroundPointerOver}" />
					<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonBorderBrushPointerOver}" />
				</Style>

				<Style Selector="^:pointerover /template/ Border#OuterBorder">
				</Style>

				<Style Selector="^:pointerover /template/ Border#CheckOuterBorder">
					<!--					<Setter Property="Stroke" Value="{DynamicResource RadioButtonOuterBorderCheckedStrokePointerOver}" />
					<Setter Property="Fill" Value="{DynamicResource RadioButtonOuterBorderCheckedFillPointerOver}" />-->
				</Style>

				<Style Selector="^:pointerover /template/ Border#CheckGlyph">
					<Setter Property="Background" Value="#3090FF" />
				</Style>


				<!--  Pressed State  -->
				<Style Selector="^:pressed /template/ ContentPresenter#PART_ContentPresenter">
					<Setter Property="Foreground" Value="{DynamicResource RadioButtonForegroundPressed}" />
				</Style>

				<Style Selector="^:pressed /template/ Border#RootBorder">
					<Setter Property="Background" Value="{DynamicResource RadioButtonBackgroundPressed}" />
					<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonBorderBrushPressed}" />
				</Style>

				<Style Selector="^:pressed /template/ Border#OuterBorder">
					<!--					<Setter Property="Stroke" Value="{DynamicResource RadioButtonOuterBorderStrokePressed}" />
					<Setter Property="Fill" Value="{DynamicResource RadioButtonOuterBorderFillPressed}" />-->
				</Style>

				<Style Selector="^:pressed /template/ Border#CheckOuterBorder">
					<!--<Setter Property="Stroke" Value="{DynamicResource RadioButtonOuterBorderCheckedStrokePressed}" />
					<Setter Property="Fill" Value="{DynamicResource RadioButtonOuterBorderCheckedFillPressed}" />-->
				</Style>

				<Style Selector="^:pressed /template/ Border#CheckGlyph">
					<Setter Property="Background" Value="#1070D0" />
				</Style>


				<!--  Disabled State  -->
				<Style Selector="^:disabled /template/ ContentPresenter#PART_ContentPresenter">
					<Setter Property="Foreground" Value="{DynamicResource RadioButtonForegroundDisabled}" />
				</Style>

				<Style Selector="^:disabled /template/ Border#RootBorder">
					<Setter Property="Background" Value="{DynamicResource RadioButtonBackgroundDisabled}" />
					<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonBorderBrushDisabled}" />
				</Style>

				<Style Selector="^:disabled /template/ Border#OuterBorder">
				</Style>

				<Style Selector="^:disabled /template/ Border#CheckOuterBorder">
				</Style>

				<Style Selector="^:disabled /template/ Border#CheckGlyph">
					<Setter Property="Background" Value="#2050A0" />
				</Style>


				<!--  Checked State  -->
				<Style Selector="^:checked /template/ Border#CheckGlyph">
					<Setter Property="Opacity" Value="1" />
				</Style>

				<Style Selector="^:checked /template/ Border#OuterBorder">
					<Setter Property="Opacity" Value="0" />
				</Style>

				<Style Selector="^:checked /template/ Border#CheckOuterBorder">
					<Setter Property="Opacity" Value="1" />
				</Style>
			</ControlTheme>
		</ResourceDictionary>
	</Application.Resources>
	<Application.Styles>
		<FluentTheme/>
		<!--<DevolutionsDevExpressTheme />-->
		<!--<DevolutionsMacOsTheme/>-->
		<StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml" />
		<StyleInclude Source="avares://AvaloniaProgressRing/Styles/ProgressRing.xaml"/>
		<dialoghostavalonia:DialogHostStyles/>
		<Style Selector="ContextMenu">
			<!--<Setter Property="FontFamily" Value="{StaticResource SarasaMonoSlabCLFont}"/>-->
		</Style>
		<Style Selector="MenuItem:selected">
			<Style Selector="^ /template/ Border#PART_LayoutRoot">
				<Setter Property="Background" Value="{DynamicResource AccentButtonBackground}" />
			</Style>
		</Style>

		<Style Selector="MenuItem:pressed /template/ Border#PART_LayoutRoot:pointerover">
			<Setter Property="Background" Value="{DynamicResource AccentButtonBackgroundPressed}" />
		</Style>
		<Style Selector="MenuItem">
			<Setter Property="FontFamily" Value="{StaticResource SarasaMonoSlabCLFont}"/>
			<Setter Property="Padding" Value="16,2"/>
			<Setter Property="FontSize" Value="12"/>
		</Style>
		<Style Selector="NumericUpDown">
			<Setter Property="VerticalAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="MinHeight" Value="0"/>
			<Setter Property="Padding" Value="4,2"/>
		</Style>
	</Application.Styles>
</Application>