1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:OxyPlot.Wpf">
- <local:ThicknessConverter x:Key="ThicknessConverter" />
- <Style TargetType="{x:Type local:TrackerControl}">
- <Setter Property="Background" Value="#E0FFFFA0" />
- <Setter Property="BorderBrush" Value="Black" />
- <Setter Property="BorderThickness" Value="1" />
- <Setter Property="BorderEdgeMode" Value="Aliased" />
- <Setter Property="LineStroke" Value="#80000000" />
- <Setter Property="HorizontalLineVisibility" Value="Visible" />
- <Setter Property="VerticalLineVisibility" Value="Visible" />
- <Setter Property="LineThickness" Value="1" />
- <Setter Property="Distance" Value="7" />
- <Setter Property="CornerRadius" Value="0" />
- <Setter Property="ShowPointer" Value="true" />
- <Setter Property="CanCenterHorizontally" Value="true" />
- <Setter Property="CanCenterVertically" Value="true" />
- <Setter Property="IsHitTestVisible" Value="false" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type local:TrackerControl}">
- <Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <Line
- x:Name="PART_HorizontalLine"
- RenderOptions.EdgeMode="Aliased"
- Stroke="{TemplateBinding LineStroke}"
- StrokeDashArray="{TemplateBinding LineDashArray}"
- StrokeThickness="{TemplateBinding LineThickness}"
- Visibility="{TemplateBinding HorizontalLineVisibility}" />
- <Line
- x:Name="PART_VerticalLine"
- RenderOptions.EdgeMode="Aliased"
- Stroke="{TemplateBinding LineStroke}"
- StrokeDashArray="{TemplateBinding LineDashArray}"
- StrokeThickness="{TemplateBinding LineThickness}"
- Visibility="{TemplateBinding VerticalLineVisibility}" />
- <Grid x:Name="PART_ContentContainer">
- <Path
- x:Name="PART_Path"
- Fill="{TemplateBinding Background}"
- RenderOptions.EdgeMode="{TemplateBinding BorderEdgeMode}"
- Stroke="{TemplateBinding BorderBrush}"
- StrokeThickness="{TemplateBinding BorderThickness,
- Converter={StaticResource ThicknessConverter}}" />
- <ContentPresenter
- x:Name="PART_Content"
- HorizontalAlignment="Center"
- VerticalAlignment="Center" />
- </Grid>
- </Canvas>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="{x:Type local:PlotViewBase}">
- <Setter Property="Background" Value="White" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="DefaultTrackerTemplate">
- <Setter.Value>
- <ControlTemplate>
- <local:TrackerControl LineExtents="{Binding PlotModel.PlotArea}" Position="{Binding Position}">
- <local:TrackerControl.Content>
- <TextBlock Margin="7" Text="{Binding}" />
- </local:TrackerControl.Content>
- </local:TrackerControl>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="ZoomRectangleTemplate">
- <Setter.Value>
- <ControlTemplate>
- <Rectangle
- Fill="#40FFFF00"
- Stroke="Black"
- StrokeDashArray="3,1" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type local:PlotViewBase}">
- <Border
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}">
- <Grid x:Name="PART_Grid" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|