C# Oxyplot-隐藏记号标记标签

C# Oxyplot-隐藏记号标记标签,c#,wpf,xaml,oxyplot,C#,Wpf,Xaml,Oxyplot,我试图隐藏x轴上的第一个和最后一个记号标签。我曾经通过样式和样式触发器做过一次,但那个代码已经消失了……在某处。这就是我的工作 <UserControl x:Class="PentagearRT.Controls.Graph" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

我试图隐藏x轴上的第一个和最后一个记号标签。我曾经通过样式和样式触发器做过一次,但那个代码已经消失了……在某处。这就是我的工作

<UserControl
    x:Class="PentagearRT.Controls.Graph"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:oxy="http://oxyplot.org/wpf"
    xmlns:local="clr-namespace:PentagearRT.Controls"
    mc:Ignorable="d"
    d:DesignHeight="500"
    d:DesignWidth="800">

    <Grid>
        <oxy:Plot>
            <oxy:Plot.Resources>
            </oxy:Plot.Resources>
            <oxy:Plot.Axes>
                <oxy:LinearAxis Position="Left" Minimum="-5" Maximum="5" MajorStep="1"
                                MajorGridlineColor="AliceBlue" MajorGridlineThickness=".07" MajorGridlineStyle="Dot"/>
                <oxy:LinearAxis Position="Bottom" Minimum="0" Maximum="360" MajorStep="45" StringFormat="0&#176;"
                                MajorGridlineColor="AliceBlue" MajorGridlineThickness=".07" MajorGridlineStyle="Dot"/>
            </oxy:Plot.Axes>
            <oxy:LineSeries Background="Black"/>

        </oxy:Plot>
    </Grid>

</UserControl>

编辑: 我想隐藏的是用红色圈起来的两个值


我用了你的代码,不知道你在说什么
<oxy:Plot.Resources>
    <Style TargetType="TextBlock">
        <Style.Triggers>
            <Trigger Property="Text" Value="360°">
                <Setter Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="Text" Value="0°">
                <Setter Property="Visibility" Value="Collapsed"/>
            </Trigger>
        </Style.Triggers>
    </Style>
</oxy:Plot.Resources>