FeederBlobParams.xaml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.FeederBlobParams"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  6. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  7. xmlns:sys="clr-namespace:System;assembly=mscorlib"
  8. xmlns:uControl="clr-namespace:TeamAAS_VP.Controls"
  9. xmlns:wf="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
  10. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  11. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  12. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  13. xmlns:vp="clr-namespace:Cognex.VisionPro.Blob;assembly=Cognex.VisionPro.Blob.Controls"
  14. xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
  15. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  16. lex:LocalizeDictionary.DesignCulture="zh-CN"
  17. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  18. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  19. prism:ViewModelLocator.AutoWireViewModel="True"
  20. mc:Ignorable="d"
  21. d:DataContext="{d:DesignInstance Type=vm:FeederBlobParamsViewModel}"
  22. d:Height="600"
  23. d:Width="1024"
  24. d:Background="White"
  25. FontFamily="{DynamicResource DefaultFont}">
  26. <prism:Dialog.WindowStyle>
  27. <Style TargetType="Window">
  28. <Setter Property="prism:Dialog.WindowStartupLocation"
  29. Value="CenterScreen" />
  30. <Setter Property="AllowDrop"
  31. Value="True" />
  32. <Setter Property="Height"
  33. Value="500" />
  34. <Setter Property="Width"
  35. Value="900" />
  36. <Setter Property="ShowInTaskbar"
  37. Value="True" />
  38. <!--<Setter Property="SizeToContent"
  39. Value="WidthAndHeight" />-->
  40. <!--<Setter Property="WindowState"
  41. Value="Maximized" />-->
  42. <Setter Property="Topmost"
  43. Value="True" />
  44. </Style>
  45. </prism:Dialog.WindowStyle>
  46. <Grid>
  47. <Grid.RowDefinitions>
  48. <RowDefinition Height="*" />
  49. <RowDefinition Height="auto" />
  50. <RowDefinition Height="auto" />
  51. </Grid.RowDefinitions>
  52. <wf:WindowsFormsHost Grid.Column="0" Margin="0,0,0,35">
  53. <vp:CogBlobEditV2 x:Name="BlobEditV2"/>
  54. </wf:WindowsFormsHost>
  55. <Button Content="{lex:Loc 运行}"
  56. HorizontalAlignment="Left"
  57. VerticalAlignment="Bottom"
  58. Margin="5,0"
  59. Command="{Binding RunBlobToolCommand}" />
  60. <StackPanel Grid.Row="1"
  61. Orientation="Horizontal">
  62. <TextBlock Text="{lex:Loc 当前Blob总面积,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  63. VerticalAlignment="Center"></TextBlock>
  64. <TextBlock Text="{Binding BlobTotalArea,StringFormat= {}{0:F1},Mode=TwoWay}"
  65. VerticalAlignment="Center" />
  66. <Button Content="{materialDesign:PackIcon Kind=RayStartArrow}"
  67. Margin="10,0,0,0"
  68. Command="{Binding SetCurrnetAreaCommand}"
  69. Background="Transparent"
  70. BorderBrush="Transparent"
  71. Foreground="LightSkyBlue" />
  72. <TextBlock Text="{lex:Loc 供料面积下限,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}"
  73. Foreground="Green"
  74. FontWeight="Bold"
  75. VerticalAlignment="Center"
  76. Margin="10,5,0,5" />
  77. <mah:NumericUpDown Grid.Row="3"
  78. Grid.Column="1"
  79. Minimum="0"
  80. Interval="10"
  81. Margin="0,5"
  82. Foreground="Green"
  83. StringFormat="{}{0:N0}"
  84. materialDesign:HintAssist.Hint="{lex:Loc 最小面积}"
  85. Value="{Binding MinArea,Mode=TwoWay}" />
  86. </StackPanel>
  87. <StackPanel Grid.Row="2"
  88. Orientation="Horizontal"
  89. VerticalAlignment="Center"
  90. HorizontalAlignment="Right">
  91. <Button Height="30"
  92. Content="{lex:Loc 确定}"
  93. materialDesign:ButtonAssist.CornerRadius="10"
  94. ToolTip="{lex:Loc 确定}"
  95. Command="{Binding ConfirmCommand}">
  96. </Button>
  97. <Button Height="30"
  98. Margin="20,0,20,5"
  99. materialDesign:ButtonAssist.CornerRadius="10"
  100. Style="{StaticResource MaterialDesignRaisedButton}"
  101. ToolTip="{lex:Loc 取消}"
  102. Command="{Binding CancelCommand}">
  103. <TextBlock Text="{lex:Loc 取消}" />
  104. </Button>
  105. </StackPanel>
  106. </Grid>
  107. </UserControl>