LanguageView.axaml 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. <UserControl
  2. x:Class="ShakerApp.Views.LanguageView"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="using:ShakerApp"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="using:ShakerApp.ViewModels"
  9. d:DesignHeight="450"
  10. d:DesignWidth="800"
  11. x:DataType="vm:ShakerSettingViewModel"
  12. Background="Transparent"
  13. DataContext="{Binding Source={x:Static vm:ShakerSettingViewModel.Instance}}">
  14. <StackPanel
  15. Margin="10,10,0,0"
  16. VerticalAlignment="Top"
  17. Orientation="Horizontal">
  18. <TextBlock VerticalAlignment="Center" Text="{DynamicResource Language}" />
  19. <ComboBox
  20. Width="220"
  21. Height="{StaticResource ItemHeight}"
  22. ItemsSource="{Binding Languages, Mode=OneWay}"
  23. SelectedValue="{Binding CurrentLanguage}">
  24. <ComboBox.ItemTemplate>
  25. <DataTemplate>
  26. <TextBlock Text="{Binding Name}" />
  27. </DataTemplate>
  28. </ComboBox.ItemTemplate>
  29. </ComboBox>
  30. </StackPanel>
  31. </UserControl>