ManualSettingControl.xaml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <UserControl
  2. x:Class="SHJX.Service.Library.Views.ManualControl.ManualSettingControl"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:convert="clr-namespace:CustomUI.Converters"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:SHJX.Service.Library.Views.ManualControl"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
  10. mc:Ignorable="d">
  11. <UserControl.Resources>
  12. <ResourceDictionary>
  13. <convert:ObjectConvert x:Key="objectConverter" />
  14. <ResourceDictionary.MergedDictionaries>
  15. <ResourceDictionary Source="pack://application:,,,/Panuon.UI.Silver;component/Control.xaml" />
  16. <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
  17. </ResourceDictionary.MergedDictionaries>
  18. </ResourceDictionary>
  19. </UserControl.Resources>
  20. <GroupBox
  21. x:Name="gb"
  22. Width="140"
  23. Height="120"
  24. Margin="0,5,0,5"
  25. HorizontalAlignment="Center"
  26. VerticalAlignment="Center"
  27. pu:GroupBoxHelper.CornerRadius="8"
  28. pu:GroupBoxHelper.IsSplitLineVisible="True"
  29. pu:GroupBoxHelper.ShadowColor="LightGray">
  30. <Grid>
  31. <Grid.RowDefinitions>
  32. <RowDefinition />
  33. <RowDefinition />
  34. </Grid.RowDefinitions>
  35. <TextBox
  36. x:Name="txt_setting"
  37. Grid.Row="0"
  38. Width="130"
  39. Height="30"
  40. pu:TextBoxHelper.CornerRadius="6"
  41. pu:TextBoxHelper.FocusedBorderBrush="#6452A4"
  42. pu:TextBoxHelper.FocusedShadowColor="#6452A4"
  43. pu:TextBoxHelper.Watermark="0"
  44. Cursor="IBeam" />
  45. <UniformGrid
  46. Grid.Row="1"
  47. Columns="2"
  48. Rows="1">
  49. <Button
  50. x:Name="btn_left"
  51. Width="60"
  52. Height="25"
  53. pu:ButtonHelper.ClickStyle="Sink"
  54. pu:ButtonHelper.CornerRadius="10"
  55. pu:ButtonHelper.HoverBrush="#929FDE"
  56. pu:ButtonHelper.WaitingContent="{x:Null}"
  57. Background="#6452A4"
  58. Cursor="Hand"
  59. FontFamily="{StaticResource FontAwesome}">
  60. <Button.CommandParameter>
  61. <MultiBinding Converter="{StaticResource ResourceKey=objectConverter}" Mode="TwoWay">
  62. <MultiBinding.Bindings>
  63. <Binding ElementName="gb" Path="Header" />
  64. <Binding ElementName="txt_setting" Path="Text" />
  65. </MultiBinding.Bindings>
  66. </MultiBinding>
  67. </Button.CommandParameter>
  68. </Button>
  69. <Button
  70. x:Name="btn_right"
  71. Width="60"
  72. Height="25"
  73. pu:ButtonHelper.ClickStyle="Sink"
  74. pu:ButtonHelper.CornerRadius="10"
  75. pu:ButtonHelper.HoverBrush="#929FDE"
  76. pu:ButtonHelper.WaitingContent="{x:Null}"
  77. Background="#6452A4"
  78. Cursor="Hand"
  79. FontFamily="{StaticResource FontAwesome}">
  80. <Button.CommandParameter>
  81. <MultiBinding Converter="{StaticResource ResourceKey=objectConverter}" Mode="TwoWay">
  82. <MultiBinding.Bindings>
  83. <Binding ElementName="gb" Path="Header" />
  84. <Binding ElementName="txt_setting" Path="Text" />
  85. </MultiBinding.Bindings>
  86. </MultiBinding>
  87. </Button.CommandParameter>
  88. </Button>
  89. </UniformGrid>
  90. </Grid>
  91. </GroupBox>
  92. </UserControl>