TestView.xaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <UserControl x:Class="ivf_tl_Manage.Views.TestView"
  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:ivf_tl_Manage.Views"
  7. xmlns:oxy="http://oxyplot.org/wpf"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800"
  10. Width="1830" Height="1015"
  11. FontFamily="{StaticResource sourceHan}">
  12. <UserControl.Resources>
  13. <SolidColorBrush x:Key="ListBox.Static.Background" Color="#FFFFFFFF"/>
  14. <SolidColorBrush x:Key="ListBox.Static.Border" Color="#FFABADB3"/>
  15. <SolidColorBrush x:Key="ListBox.Disabled.Background" Color="#FFFFFFFF"/>
  16. <SolidColorBrush x:Key="ListBox.Disabled.Border" Color="#FFD9D9D9"/>
  17. <Style x:Key="DateListBoxStyle" TargetType="{x:Type ListBox}">
  18. <Setter Property="Background" Value="{StaticResource ListBox.Static.Background}"/>
  19. <Setter Property="BorderBrush" Value="{StaticResource ListBox.Static.Border}"/>
  20. <Setter Property="BorderThickness" Value="1"/>
  21. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  22. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  23. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  24. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  25. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  26. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  27. <Setter Property="VerticalContentAlignment" Value="Center"/>
  28. <Setter Property="Template">
  29. <Setter.Value>
  30. <ControlTemplate TargetType="{x:Type ListBox}">
  31. <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="1" SnapsToDevicePixels="true">
  32. <ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
  33. <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  34. </ScrollViewer>
  35. </Border>
  36. </ControlTemplate>
  37. </Setter.Value>
  38. </Setter>
  39. </Style>
  40. </UserControl.Resources>
  41. <Canvas Width="1830" Height="1015">
  42. <Canvas Canvas.Left="20" Canvas.Top="107" Width="895" Height="402" Background="Transparent">
  43. <ListBox Style="{DynamicResource ListBoxStyle1}" Width="100" Height="100" Background="Red"/>
  44. </Canvas>
  45. <!--<oxy:PlotView Width="895" Height="402" x:Name="_plot" Model="{Binding HistoryModel}"/>-->
  46. <TextBlock Text="2222" FontSize="18" Canvas.Top="500"/>
  47. </Canvas>
  48. </UserControl>