0
0
mirror of https://github.com/sp-tarkov/launcher.git synced 2025-02-13 09:10:44 -05:00
launcher/project/SPT.Launcher/Views/Dialogs/ChangeEditionDialogView.axaml

44 lines
2.2 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:helpers="using:SPT.Launcher.Helpers"
xmlns:dialogHost="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia"
xmlns:s="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SPT.Launcher.Views.Dialogs.ChangeEditionDialogView"
Background="{DynamicResource BackgroundBrush}"
>
<Grid RowDefinitions="10,AUTO,AUTO,AUTO,10" ColumnDefinitions="10,*,AUTO,10">
<Label Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2"
Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=wipe_warning}"
Foreground="IndianRed"
/>
<ComboBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2"
ItemsSource="{Binding editions.AvailableEditions}"
SelectedItem="{Binding editions.SelectedEdition}"
PlaceholderText="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=select_edition}"
>
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Background="Transparent" Text="{Binding Name}" ToolTip.Tip="{Binding Description}"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<StackPanel Spacing="10" Grid.Row="3" Grid.Column="2" Orientation="Horizontal">
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=update}"
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
CommandParameter="{Binding editions.SelectedEdition}"
Classes="acc"
/>
<Button Content="{Binding Source={x:Static helpers:LocalizationProvider.Instance}, Path=cancel}"
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=dialogHost:DialogHost}, Path=CloseDialogCommand}"
/>
</StackPanel>
</Grid>
</UserControl>