SusceptorNotchControl.xaml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <UserControl x:Class="Aitex.Core.UI.Control.SusceptorNotchControl"
  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. mc:Ignorable="d"
  7. d:DesignHeight="50" d:DesignWidth="50" Name="containerControl">
  8. <Viewbox>
  9. <Viewbox.Resources>
  10. <Style TargetType="{x:Type TextBox}">
  11. <Setter Property="VerticalContentAlignment" Value="Center"/>
  12. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  13. <Setter Property="Width" Value="50"/>
  14. <Setter Property="Height" Value="50"/>
  15. <Setter Property="Template">
  16. <Setter.Value>
  17. <ControlTemplate TargetType="{x:Type TextBox}">
  18. <Grid x:Name="grid">
  19. <Rectangle x:Name="rectangle1" RadiusX="25" RadiusY="25" Fill="{TemplateBinding Background}" StrokeThickness="1" Stroke="Black"/>
  20. <ScrollViewer x:Name="PART_ContentHost"
  21. HorizontalScrollBarVisibility="Hidden"
  22. VerticalScrollBarVisibility="Hidden"
  23. Padding="{TemplateBinding Padding}"
  24. Focusable="false">
  25. </ScrollViewer>
  26. </Grid>
  27. </ControlTemplate>
  28. </Setter.Value>
  29. </Setter>
  30. </Style>
  31. </Viewbox.Resources>
  32. <TextBox Name="textBoxWafer" FontSize="28" Margin="0" Padding="0"
  33. HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
  34. MouseEnter="Label_MouseEnter" MouseLeave="Label_MouseLeave" PreviewMouseDown="Label_MouseDown"
  35. Background="#FF2B2B2B" MaxLength="2" BorderBrush="Transparent"
  36. IsReadOnly="{Binding ElementName=containerControl,Path=IsReadonly}"
  37. Text="{Binding ElementName=containerControl,Path=DisplayIndex}" MaxLines="1" TextChanged="textBoxWafer_TextChanged" />
  38. </Viewbox>
  39. </UserControl>