Pathgeometry combine Error
<p>Here I am using follwing code for the Draw RoundRect.The Path geomatric use for the save RoundRect Points . there is only fault with round rect geometry when combine.  single Roundrect geometry is appeared during drawing .but after combine its only Ellips geometry appeared and round rect not appeared.  </p>

<pre><code>  //  ---------------------------------------------------------------
  //  Below Function generate Round rect PathGeometry...........
 //   ---------------------------------------------------------------
public PathGeometry RoundRect()
        {
            Rect rect = new Rect(30, 30, 200, 200);            
            Pen pen = new Pen(null, 50);
            Brush brush = null;
            CornerRadius cornerRadius = new CornerRadius(10, 10, 10,10);
            var geometry = new StreamGeometry();

            using (var context = geometry.Open())
            {
                bool isStroked = pen != null;
                const bool isSmoothJoin = true;

                context.BeginFigure(rect.TopLeft + new Vector(0, cornerRadius.TopLeft), brush != null, true);
                context.ArcTo(new Point(rect.TopLeft.X + cornerRadius.TopLeft, rect.TopLeft.Y),
                    new Size(cornerRadius.TopLeft, cornerRadius.TopLeft),
                    90, false, SweepDirection.Clockwise, isStroked, isSmoothJoin);
                context.LineTo(rect.TopRight - new Vector(cornerRadius.TopRight, 0), isStroked, isSmoothJoin);
                context.ArcTo(new Point(rect.TopRight.X, rect.TopRight.Y + cornerRadius.TopRight),
                    new Size(cornerRadius.TopRight, cornerRadius.TopRight),
                    90, false, SweepDirection.Clockwise, isStroked, isSmoothJoin);
                context.LineTo(rect.BottomRight - new Vector(0, cornerRadius.BottomRight), isStroked, isSmoothJoin);
                context.ArcTo(new Point(rect.BottomRight.X - cornerRadius.BottomRight, rect.BottomRight.Y),
                    new Size(cornerRadius.BottomRight, cornerRadius.BottomRight),
                    90, false, SweepDirection.Clockwise, isStroked, isSmoothJoin);
                context.LineTo(rect.BottomLeft + new Vector(cornerRadius.BottomLeft, 0), isStroked, isSmoothJoin);
                context.ArcTo(new Point(rect.BottomLeft.X, rect.BottomLeft.Y - cornerRadius.BottomLeft),
                    new Size(cornerRadius.BottomLeft, cornerRadius.BottomLeft),
                    90, false, SweepDirection.Clockwise, isStroked, isSmoothJoin);

                context.Close();
            }

            PathGeometry pt = new PathGeometry();
            pt = PathGeometry.CreateFromGeometry(geometry);
            return pt;
        }

    //---------------------------------------------------------------
  //  Below Function generate Ellips PathGeometry...........
    //---------------------------------------------------------------
  public PathGeometry ellips()
        {
            EllipseGeometry eGeo = new EllipseGeometry(new Rect(30, 30, 200, 200));
            return eGeo.GetFlattenedPathGeometry();
        } 


---------------------------------------------------------------
Below Function Combine both pathgeometry and make new pathgeometry
---------------------------------------------------------------
    PathGeometry pathGeometry = new PathGeometry();
         PathGeometry pathGeometry1 = new PathGeometry();
         PathGeometry pathGeometry2 = new PathGeometry();

        protected override void OnRender(DrawingContext dc)   
        {          
            pathGeometry1 = this.RoundRect();

            pathGeometry2 = ellips();
            pathGeometry = PathGeometry.Combine(pathGeometry1, pathGeometry2,              GeometryCombineMode.Union, null);            
            dc.DrawGeometry(null, new Pen(new SolidColorBrush(Colors.Red), 1), pathGeometry);

        } 

    //---------------------------------------------------------------
   // Output
   // ---------------------------------------------------------------
</code></pre>

<p>But here in outPut ,RoundRect Geometry is not appeared after combined ,
Only Ellips is appeared
Please let me know the mistakee in My Code.
Or suggest any other way to achive this functionality.</p>
