ConfigFileManager.xaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <UserControl x:Class="ConfigFileManager.Views.ConfigFileManager"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:ConfigFileManager.Views"
  7. mc:Ignorable="d"
  8. xmlns:contorls="clr-namespace:ConfigFileManager.Controls"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.Resources>
  11. <ResourceDictionary Source="/UICommon;component/Resources.xaml"/>
  12. </UserControl.Resources>
  13. <Grid>
  14. <ScrollViewer>
  15. <ItemsControl ItemsSource="{Binding Devices}">
  16. <ItemsControl.ItemTemplate>
  17. <DataTemplate>
  18. <Expander Margin="8" IsExpanded="True">
  19. <Expander.Header>
  20. <TextBlock Text="{Binding Key}" FontSize="13"></TextBlock>
  21. </Expander.Header>
  22. <ItemsControl ItemsSource="{Binding Value}">
  23. <ItemsControl.ItemTemplate>
  24. <DataTemplate>
  25. <contorls:ConfigFilePlot DeviceInfo="{Binding}" IsUpdate="{Binding ConfigUpdating}"
  26. CheckRecipeCommand="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ConfigFileManager}, Path=DataContext.CheckRecipeCommand}"
  27. CheckConfigCommand="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ConfigFileManager}, Path=DataContext.CheckConfigCommand}"
  28. MigrateCommand="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ConfigFileManager}, Path=DataContext.MigrateCommand}"
  29. UpdateCommand="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ConfigFileManager}, Path=DataContext.UpdateCommand}"/>
  30. </DataTemplate>
  31. </ItemsControl.ItemTemplate>
  32. <ItemsControl.ItemsPanel>
  33. <ItemsPanelTemplate>
  34. <WrapPanel/>
  35. </ItemsPanelTemplate>
  36. </ItemsControl.ItemsPanel>
  37. </ItemsControl>
  38. </Expander>
  39. </DataTemplate>
  40. </ItemsControl.ItemTemplate>
  41. <ItemsControl.ItemsPanel>
  42. <ItemsPanelTemplate>
  43. <StackPanel/>
  44. </ItemsPanelTemplate>
  45. </ItemsControl.ItemsPanel>
  46. </ItemsControl>
  47. </ScrollViewer>
  48. </Grid>
  49. </UserControl>