none
这样的图标控件怎么写,请教各位大佬 RRS feed

全部回复

  • 找了一圈没有找到,好多坐标轴的第三方控件都是不能更改背景图片,如果自己用Path画动态坐标轴很复杂吗

    • 已合并 Alex-KSGZ 2020年5月14日 7:46 same case
    2020年5月11日 0:38
  • 你好,

    用Path画坐标的复杂程度取决于你的数据复杂程度。单独用Path画坐标轴不是很复杂,比如如下示例就是一个很简单的坐标轴:

    <Canvas x:Name="chartCanvas" Margin="5">
            <Line x:Name="MyX_axis" Stroke="Black" StrokeThickness="3" X1="40" Y1="280" X2="480" Y2="280" StrokeStartLineCap="Round"/>
            <Line x:Name="MyY_axis" Stroke="Black" StrokeThickness="3" X1="40" Y1="280" X2="40" Y2="30" StrokeStartLineCap="Round"/>
            <Path x:Name="x_axisArrow" Fill="Black">
                <Path.Data>
                    <PathGeometry>
                        <PathFigure StartPoint="480,276" IsClosed="True">
                            <LineSegment Point="480,284"/>
                            <LineSegment Point="490,280"/>
                        </PathFigure>
                    </PathGeometry>
                </Path.Data>
            </Path>
            <Path x:Name="y_axisArrow" Fill="Black">
                <Path.Data>
                    <PathGeometry>
                        <PathFigure StartPoint="36,30" IsClosed="True">
                            <LineSegment Point="44,30"/>
                            <LineSegment Point="40,20"/>
                        </PathFigure>
                    </PathGeometry>
                </Path.Data>
            </Path>
            <TextBlock x:Name="x_label" Text="x" Canvas.Left="477" Canvas.Top="279" FontFamily="Arial" FontStyle="Italic" FontSize="20"/>
            <TextBlock x:Name="y_label" Text="y" Canvas.Left="20" Canvas.Top="4" FontFamily="Arial" FontStyle="Italic" FontSize="20"/>
            <TextBlock x:Name="o_label" Text="0" Canvas.Left="20" Canvas.Top="272" FontFamily="Arial" FontStyle="Italic" FontSize="20"/>     
        </Canvas>

    然后你可以在cs中动态加载坐标中的数据。

    谢谢

    Daisy Tian


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    2020年5月14日 7:08