ConfigFileManager.xaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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="/ConfigFileManager;component/Resources.xaml"/>
  12. </UserControl.Resources>
  13. <Grid>
  14. <!--<contorls:ConfigFilePlot/>-->
  15. <ScrollViewer>
  16. <ItemsControl ItemsSource="{Binding DeviceCollection.Devices}">
  17. <ItemsControl.ItemTemplate>
  18. <DataTemplate>
  19. <Expander Margin="8" IsExpanded="True">
  20. <Expander.Header>
  21. <TextBlock Text="{Binding Key}" FontSize="13"></TextBlock>
  22. </Expander.Header>
  23. <ItemsControl ItemsSource="{Binding Value}">
  24. <ItemsControl.ItemTemplate>
  25. <DataTemplate>
  26. <contorls:ConfigFilePlot DeviceInfo="{Binding}"
  27. MigrateCommand="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ConfigFileManager}, Path=DataContext.MigrateCommand}"
  28. UpdateCommand="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:ConfigFileManager}, Path=DataContext.UpdateCommand}"/>
  29. </DataTemplate>
  30. </ItemsControl.ItemTemplate>
  31. <ItemsControl.ItemsPanel>
  32. <ItemsPanelTemplate>
  33. <WrapPanel/>
  34. </ItemsPanelTemplate>
  35. </ItemsControl.ItemsPanel>
  36. </ItemsControl>
  37. </Expander>
  38. </DataTemplate>
  39. </ItemsControl.ItemTemplate>
  40. <ItemsControl.ItemsPanel>
  41. <ItemsPanelTemplate>
  42. <StackPanel/>
  43. </ItemsPanelTemplate>
  44. </ItemsControl.ItemsPanel>
  45. </ItemsControl>
  46. </ScrollViewer>
  47. </Grid>
  48. </UserControl>