2016-10-21 3 views
0

WPF 초급 여기 ...이 세 번째 경로가 캔버스에 렌더링되지 않는 이유는 무엇입니까?

이 XAML 문서의 세 번째 경로가 창에 렌더링되지 않는 이유를 설명하십시오. 첫 번째 및 두 번째 경로는 렌더링해야하지만 세 번째 경로는 렌더링되지 않습니다.

<Canvas> 
    <Path Stroke="Blue" StrokeThickness="5" Canvas.Top="20"> 
     <Path.Data> 
      <PathGeometry> 
       <PathFigure StartPoint="10, 10"> 
        <BezierSegment Point1="130,30" Point2="40,140" Point3="150,150"></BezierSegment> 
       </PathFigure> 
      </PathGeometry> 
     </Path.Data> 
    </Path> 
    <Path Stroke="Green" StrokeThickness="2" StrokeDashArray="5 2" Canvas.Top="20"> 
     <Path.Data> 
      <GeometryGroup> 
       <LineGeometry StartPoint="10,10" EndPoint="130,30"></LineGeometry> 
       <LineGeometry StartPoint="40,140" EndPoint="150,150"></LineGeometry> 
      </GeometryGroup> 
     </Path.Data> 
    </Path> 

    <!-- This path is not being rendered for some reason --> 
    <Path Fill="Red" StrokeThickness="8" Canvas.Top="20"> 
     <Path.Data> 
      <GeometryGroup> 
       <EllipseGeometry Center="130 30"></EllipseGeometry> 
       <EllipseGeometry Center="40 140"></EllipseGeometry> 
      </GeometryGroup> 
     </Path.Data> 
    </Path> 
</Canvas> 

답변

1

당신은 스트로크 = "레드"를 누락 :

<Path Fill="Red" Stroke="Red" StrokeThickness="8" Canvas.Top="20"> 
    <Path.Data> 
    <GeometryGroup> 
     <EllipseGeometry Center="130 30"></EllipseGeometry> 
     <EllipseGeometry Center="40 140"></EllipseGeometry> 
    </GeometryGroup> 
    </Path.Data> 
</Path> 

당신은 또한 다음과 같은 실험 수 :

<Path Fill="Blue" Stroke="Red" StrokeThickness="2" Canvas.Top="20"> 
    <Path.Data> 
    <GeometryGroup> 
     <EllipseGeometry Center="130 30" RadiusX="5" RadiusY="5"></EllipseGeometry> 
     <EllipseGeometry Center="40 140" RadiusX="5" RadiusY="5"></EllipseGeometry> 
    </GeometryGroup> 
    </Path.Data> 
</Path> 
+0

예 나는. 고맙습니다. – brian

관련 문제