EditorHost.axaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:mvvm="clr-namespace:Glitonea.Mvvm;assembly=Glitonea"
  4. xmlns:vm="clr-namespace:Neptune.ViewModel.Controls"
  5. xmlns:vme="clr-namespace:Neptune.ViewModel.Controls.Editors"
  6. xmlns:editors="clr-namespace:Neptune.View.Controls.Editors"
  7. xmlns:controls="clr-namespace:Neptune.View.Controls"
  8. x:Class="Neptune.View.Controls.EditorHost"
  9. DataContext="{mvvm:DataContextSource vm:EditorHostViewModel}">
  10. <Grid>
  11. <ContentPresenter HorizontalAlignment="Stretch"
  12. VerticalAlignment="Stretch"
  13. HorizontalContentAlignment="Stretch"
  14. VerticalContentAlignment="Stretch"
  15. Background="{StaticResource NeptuneDarkBackgroundBrush}"
  16. Content="{Binding $parent[controls:EditorHost].DataContext.CurrentConfigEditor}"
  17. IsVisible="{Binding $parent[controls:EditorHost].DataContext.IsEditorAvailable}">
  18. <ContentPresenter.DataTemplates>
  19. <DataTemplate DataType="vme:XteaKeysEditorViewModel">
  20. <editors:XteaKeysEditor />
  21. </DataTemplate>
  22. <DataTemplate DataType="{x:Null}">
  23. </DataTemplate>
  24. </ContentPresenter.DataTemplates>
  25. </ContentPresenter>
  26. <Grid ColumnDefinitions="Auto,Auto,Auto"
  27. RowDefinitions="Auto,Auto"
  28. HorizontalAlignment="Center"
  29. VerticalAlignment="Center"
  30. IsVisible="{Binding !IsEditorAvailable}">
  31. <TextBlock Grid.Column="0"
  32. Grid.Row="0"
  33. HorizontalAlignment="Center"
  34. FontSize="16"
  35. Text="And here I would display the editor for "
  36. Opacity="0.4" />
  37. <TextBlock Grid.Column="1"
  38. Grid.Row="0"
  39. HorizontalAlignment="Center"
  40. FontSize="16"
  41. Text="{Binding SelectedConfigMember.FriendlyName}"
  42. Opacity="0.8" />
  43. <TextBlock Grid.Column="2"
  44. Grid.Row="0"
  45. HorizontalAlignment="Center"
  46. FontSize="16"
  47. Text="."
  48. Opacity="0.4" />
  49. <TextBlock Grid.ColumnSpan="3"
  50. Grid.Row="1"
  51. HorizontalAlignment="Center"
  52. FontSize="16"
  53. Text="IF I HAD ONE"
  54. Foreground="Red"
  55. FontWeight="800"
  56. Opacity="0.8" />
  57. </Grid>
  58. </Grid>
  59. </UserControl>