public void Setup() { m_StartSegment = Substitute.For <ITurnCircleArcSegment>(); m_MiddleSegment = Substitute.For <ITurnCircleArcSegment>(); m_EndSegment = Substitute.For <ITurnCircleArcSegment>(); m_Path = Substitute.For <IPath>(); var segments = new List <IPolylineSegment> { m_StartSegment, m_MiddleSegment, m_EndSegment }; m_Path.Segments.Returns(segments); m_ArcSegmentOne = new ArcSegment(new Point(10.0, 10.0), new Size(10.0, 10.0), 45.0, false, SweepDirection.Clockwise, false); m_LineSegment = new LineSegment(new Point(20.0, 20.0), false); m_ArcSegmentTwo = new ArcSegment(new Point(30.0, 30.0), new Size(30.0, 30.0), 90.0, false, SweepDirection.Counterclockwise, false); m_ArcSegmentThree = new ArcSegment(new Point(40.0, 40.0), new Size(40.0, 40.0), 135.0, false, SweepDirection.Counterclockwise, false); m_Point = new Point(10.0, 10.0); m_Helper = Substitute.For <IPathSegmentHelper>(); m_Helper.SegmentToLineSegment(Line.Unknown).ReturnsForAnyArgs(m_LineSegment); m_Helper.SegmentToArcSegment(TurnCircleArcSegment.Unknown).ReturnsForAnyArgs(m_ArcSegmentOne, m_ArcSegmentTwo, m_ArcSegmentThree); m_Helper.PointRelativeToOrigin(null).ReturnsForAnyArgs(m_Point); m_Converter = new RacetrackPathUTurnToFiguresConverter(m_Helper); }
public static void Draw(Canvas canvas, List<LinePoint> points, Brush stroke, bool clear = true) { if (clear) { canvas.Children.Clear(); } PathFigureCollection myPathFigureCollection = new PathFigureCollection(); PathGeometry myPathGeometry = new PathGeometry(); foreach (LinePoint p in points) { PathFigure myPathFigure = new PathFigure(); myPathFigure.StartPoint = p.StartPoint; LineSegment myLineSegment = new LineSegment(); myLineSegment.Point = p.EndPoint; PathSegmentCollection myPathSegmentCollection = new PathSegmentCollection(); myPathSegmentCollection.Add(myLineSegment); myPathFigure.Segments = myPathSegmentCollection; myPathFigureCollection.Add(myPathFigure); } myPathGeometry.Figures = myPathFigureCollection; Path myPath = new Path(); myPath.Stroke = stroke == null ? Brushes.Black : stroke; myPath.StrokeThickness = 1; myPath.Data = myPathGeometry; canvas.Children.Add(myPath); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.canvas = ((System.Windows.Controls.Canvas)(target)); return; case 2: this.rangeStart = ((System.Windows.Media.PathFigure)(target)); return; case 3: this.rangeMiddle = ((System.Windows.Media.LineSegment)(target)); return; case 4: this.rangeEnd = ((System.Windows.Media.LineSegment)(target)); return; case 5: this.rangeSector = ((System.Windows.Shapes.Ellipse)(target)); return; case 6: this.rangeBorder = ((System.Windows.Shapes.Ellipse)(target)); return; case 7: this.dialProxy = ((System.Windows.Shapes.Ellipse)(target)); return; } this._contentLoaded = true; }
private void MakePathGeometry(Geometry geometry) { if (geometry.Points != null) { PathFigure pathFigure = new PathFigure() { IsClosed = _webMercatorGeometry.IsRingBase() }; if (geometry.Points.Count > 0) { pathFigure.StartPoint = ToScreen(geometry.Points.First().AsWpfPoint()); } for (int i = 1; i < geometry.Points.Count; i++) { var segment = new LineSegment(ToScreen(geometry.Points[i].AsWpfPoint()), true); pathFigure.Segments.Add(segment); } this._pathGeometry.Figures.Add(pathFigure); } else if (geometry.Geometries != null) { foreach (var g in geometry.Geometries) { MakePathGeometry(g); } } else { return; } }
public void Draw(EasingFunctionBase easingFunction) { canvas1.Children.Clear(); PathSegmentCollection pathSegments = new PathSegmentCollection(); for (double i = 0; i < 1; i += _samplingInterval) { double x = i * canvas1.Width; double y = easingFunction.Ease(i) * canvas1.Height; var segment = new LineSegment(); segment.Point = new Point(x, y); pathSegments.Add(segment); } var p = new Path(); p.Stroke = new SolidColorBrush(Colors.Black); p.StrokeThickness = 3; PathFigureCollection figures = new PathFigureCollection(); figures.Add(new PathFigure() { Segments = pathSegments }); p.Data = new PathGeometry() { Figures = figures }; canvas1.Children.Add(p); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.anglePath = ((System.Windows.Shapes.Path)(target)); return; case 2: this.angleFigure = ((System.Windows.Media.PathFigure)(target)); return; case 3: this.line1 = ((System.Windows.Media.LineSegment)(target)); return; case 4: this.line2 = ((System.Windows.Media.LineSegment)(target)); return; case 5: this.arc = ((System.Windows.Media.ArcSegment)(target)); return; } this._contentLoaded = true; }
// Create the pen and triangle in a static constructor and freeze them to improve performance. static InsertionAdorner() { pen = new Pen { Brush = Brushes.Gray, Thickness = 2 }; pen.Freeze(); LineSegment firstLine = new LineSegment(new Point(0, -5), false); firstLine.Freeze(); LineSegment secondLine = new LineSegment(new Point(0, 5), false); secondLine.Freeze(); PathFigure figure = new PathFigure { StartPoint = new Point(5, 0) }; figure.Segments.Add(firstLine); figure.Segments.Add(secondLine); figure.Freeze(); triangle = new PathGeometry(); triangle.Figures.Add(figure); triangle.Freeze(); }
public Triangle() { InitializeComponent(); l1 = new LineSegment(); l2 = new LineSegment(); f = new PathFigure(); f.Segments.Add(l1); f.Segments.Add(l2); f.IsClosed = true; PathGeometry g = new PathGeometry(); g.Figures.Add(f); Path p = new Path(); this.SetBinding(FillProperty, new Binding("Fill") { Source = p, Mode = BindingMode.TwoWay }); this.SetBinding(StrokeProperty, new Binding("Stroke") { Source = p, Mode = BindingMode.TwoWay }); this.SetBinding(StrokeThicknessProperty, new Binding("StrokeThickness") { Source = p, Mode = BindingMode.TwoWay }); p.Data = g; this.Fill = new SolidColorBrush(Colors.White); this.Stroke = new SolidColorBrush(Colors.Black); this.LayoutRoot.Children.Add(p); }
public static PathGeometry GetTrianglePathGeometry(Point[] pts) { System.Windows.Media.LineSegment lineSeg0 = new System.Windows.Media.LineSegment(pts[1], true); System.Windows.Media.LineSegment lineSeg1 = new System.Windows.Media.LineSegment(pts[2], true); System.Windows.Media.LineSegment lineSeg2 = new System.Windows.Media.LineSegment(pts[0], true); PathSegmentCollection pathsegmentCollection = new PathSegmentCollection(); pathsegmentCollection.Add(lineSeg0); pathsegmentCollection.Add(lineSeg1); pathsegmentCollection.Add(lineSeg2); PathFigure pathFigure = new PathFigure(); pathFigure.StartPoint = pts[0]; pathFigure.Segments = pathsegmentCollection; PathFigureCollection pathFigureCollection = new PathFigureCollection(); pathFigureCollection.Add(pathFigure); PathGeometry pathGeometry = new PathGeometry(); pathGeometry.Figures = pathFigureCollection; return(pathGeometry); }
public Superposition() { InitializeComponent(); PathGeometry pathGeometry = new PathGeometry(); PathFigure pathFigure = new PathFigure(); pathFigure.StartPoint = new Point(0,0); PathSegmentCollection pathSegmentCollection = new PathSegmentCollection(); int maxHeight = (int)this.Height; int maxWidth = (int)this.Width; Random rand = new Random(); for (int i = 0; i < 500; i++) { LineSegment newSegment = new LineSegment(); newSegment.Point = new Point(rand.Next(0, maxWidth), rand.Next(0, maxHeight)); pathSegmentCollection.Add(newSegment); } pathFigure.Segments = pathSegmentCollection; pathGeometry.Figures.Add(pathFigure); pathBackground.Data = pathGeometry; }
private void DefineGeometry() { PointCollection points = Points; if (points == null) { _geometry = Geometry.Empty; return; } PathFigure figure = new PathFigure(); if (points.Count > 0) { // start point figure.StartPoint = points[0]; if (points.Count > 1) { // points between double desiredRadius = Radius; for (int i = 1; i < (points.Count - 1); i++) { // adjust radius if points are too close Vector v1 = points[i] - points[i - 1]; Vector v2 = points[i + 1] - points[i]; double radius = Math.Min(Math.Min(v1.Length, v2.Length) / 2, desiredRadius); // draw the line, and stop before the next point double len = v1.Length; v1.Normalize(); v1 *= (len - radius); LineSegment line = new LineSegment(points[i - 1] + v1, true); figure.Segments.Add(line); // draw the arc to the next point v2.Normalize(); v2 *= radius; SweepDirection direction = (Vector.AngleBetween(v1, v2) > 0) ? SweepDirection.Clockwise : SweepDirection.Counterclockwise; ArcSegment arc = new ArcSegment(points[i] + v2, new Size(radius, radius), 0, false, direction, true); figure.Segments.Add(arc); } // last point figure.Segments.Add(new LineSegment(points[points.Count - 1], true)); } } PathGeometry geometry = new PathGeometry(); geometry.Figures.Add(figure); geometry.FillRule = FillRule; if (geometry.Bounds == Rect.Empty) { _geometry = Geometry.Empty; } else { _geometry = geometry; } }
public Arc(Path path, LineSegment lineSegment, ArcSegment arcSegment, Point zeroPos, Color color) { Path = path; LineSegment = lineSegment; ArcSegment = arcSegment; ZeroPos = zeroPos; Path.Stroke = ToBrush(color); Path.Fill = ToBrush(color); }
/// <summary> /// Add new point (line segment) /// </summary> public void AddPoint(Point point) { LineSegment segment = new LineSegment(point, true); segment.IsSmoothJoin = true; pathGeometry.Figures[0].Segments.Add(segment); MakePoints(); // keep points array up to date }
/// <summary> /// Adds a line to a <see cref="PathGeometry"/>. /// </summary> /// <param name="pathGeometry">The <see cref="PathGeometry"/>.</param> /// <param name="start">The start point of the line.</param> /// <param name="end">The end point of the line.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="pathGeometry"/> is <see langword="null"/>. /// </exception> public static void AddLine(this PathGeometry pathGeometry, Point start, Point end) { if (pathGeometry == null) throw new ArgumentNullException(nameof(pathGeometry)); var pathFigure = new PathFigure { StartPoint = start }; var lineSegment = new LineSegment { Point = end }; pathFigure.Segments.Add(lineSegment); pathGeometry.Figures.Add(pathFigure); }
public LineSegment SegmentToLineSegment(ILine segment) { m_Converter.GeometryPoint = segment.EndPoint; m_Converter.Convert(); var line = new LineSegment(m_Converter.Point, true); return line; }
protected override void UpdateShape() { if (ShapeStart == ShapeEnd) return; figure.StartPoint = ShapeStart; LineSegment segment = new LineSegment(); segment.Point = ShapeEnd; figure.Segments.Add(segment); }
public LineAndAreaShape(PathFigure figure) { Figure = figure; Right = new LineSegment(new Point(), false); Bottom = new LineSegment(new Point(), false); Left = new LineSegment(new Point(), false); Figure.Segments.Add(Right); Figure.Segments.Add(Bottom); Figure.Segments.Add(Left); }
/// <summary> /// Paints on a pbgra32 WriteableBitmap with a stylized airbrush /// </summary> /// <param name="bmp">The bitmap to modify</param> /// <param name="from">The starting point of the stroke</param> /// <param name="to">The end point of the stroke</param> /// <param name="color">The color of the stroke</param> /// <param name="size">The size of the stroke</param> public static unsafe void Airbrush(WriteableBitmap bmp, Point from, Point to, Color color, int size) { Random r = new Random(); if (bmp == null) return; bmp.Lock(); // Create a line segment representation LineSegment segment = new LineSegment(from, to); // Get a bounding box for the painted area BoundingBox bitmapbounds = new BoundingBox(); BoundingBox segmentbounds = new BoundingBox(); bitmapbounds.AddPoint(0, 0, 0); bitmapbounds.AddPoint(bmp.PixelWidth - 1, bmp.PixelHeight - 1, 0); segmentbounds.AddPoint((int)from.X, (int)from.Y, size + AirbrushDotRadius); segmentbounds.AddPoint((int)to.X, (int)to.Y, size + AirbrushDotRadius); segmentbounds.Clip(bitmapbounds); UInt32* start = (UInt32*)bmp.BackBuffer.ToPointer(); int stride = bmp.BackBufferStride / sizeof(UInt32); // Move from 'from' to 'to' along timestep intervals, with one dot painted per interval for (int i = 0; i < AirbrushDots; i++) { int x, y; segment.Interpolate(i, AirbrushDots, out x, out y); int dist = r.Next() % size; double angle = r.NextDouble() * 2 * Math.PI; double dx = Math.Cos(angle) * dist; double dy = Math.Sqrt(dist * dist - dx * dx); if(angle > Math.PI) dy = -dy; int bx = x + (int)dx; int by = y + (int)dy; BoundingBox dotbounds = new BoundingBox(); dotbounds.AddPoint(bx,by,AirbrushDotRadius); dotbounds.Clip(bitmapbounds); for (int k = dotbounds.Top, row = 0; k < dotbounds.Bottom; k++, y++, row++) for (int j = dotbounds.Left, col = 0; j < dotbounds.Right; j++, col++) WriteAlphaBlended(start + stride * k + j, Color.FromArgb(AirbrushDotKernel[row][col], color.R, color.G, color.B)); } bmp.AddDirtyRect(new Int32Rect(segmentbounds.Left, segmentbounds.Top, segmentbounds.Width, segmentbounds.Height)); bmp.Unlock(); }
/// <summary> /// 直接根据视图位置,绘制WPF封闭区域; /// </summary> /// <param name="screenPoints"></param> /// <param name="brush"></param> /// <param name="pen"></param> private void NativeDrawFill(IEnumerable <Point> screenPoints, SystemMedia.Brush brush, SystemMedia.Pen pen) { if (screenPoints == null) { throw new ArgumentNullException(nameof(screenPoints)); } if (pen == null) { throw new ArgumentNullException(nameof(pen)); } ValidateDrawingContext(); pen.Freeze(); //操作SystemMedia.PathGeometry中的Figures以绘制(封闭)区域 var paths = new SystemMedia.PathGeometry(); var pfc = new SystemMedia.PathFigureCollection(); var pf = new SystemMedia.PathFigure(); pfc.Add(pf); //存储一个点表示当前的PathFigure的StartPoint是否被指定; var startPointSet = false; foreach (var p in screenPoints) { //若StartPoint未被设定(第一个节点),设定后继续下一次循环; if (!startPointSet) { pf.StartPoint = p; startPointSet = true; continue; } //若若StartPoint被设定,则加入线段; var ps = new SystemMedia.LineSegment(); ps.Point = p; pf.Segments.Add(ps); } pf.IsClosed = true; paths.Figures = pfc; DrawingContext.DrawGeometry(brush, pen, paths); }
private Locateable ToEdgeLengthLocatable(Point first, Point second) { Func <Point, Point> toGeodeticWgs84 = p => MapProjects.WebMercatorToGeodeticWgs84(p); var edge = new LineSegment <Point>(first, second); var element = new View.MapMarkers.RectangleLabelMarker(edge.GetLengthLabel(toGeodeticWgs84)); //var offset = _screenToMap(15); return(new Locateable(Model.AncherFunctionHandlers.BottomCenter) { Element = element, X = edge.Middle.X, Y = edge.Middle.Y }); }
/// <summary> /// Create the pen and triangle in a static constructor and freeze them to improve performance. /// </summary> static InsertionAdorner() { Pen = new Pen { Brush = Brushes.SkyBlue, Thickness = LineThickness }; Pen.Freeze(); var firstLine = new LineSegment(new Point(0, -TriangleWidth), false); firstLine.Freeze(); var secondLine = new LineSegment(new Point(0, TriangleWidth), false); secondLine.Freeze(); var figure = new PathFigure {StartPoint = new Point(TriangleWidth, 0)}; figure.Segments.Add(firstLine); figure.Segments.Add(secondLine); figure.Freeze(); Triangle = new PathGeometry(); Triangle.Figures.Add(figure); Triangle.Freeze(); }
public static PathGeometry GenerateBezierCurve(Point[] points) { PathFigure pathFigure = new PathFigure(); PointCollection pointCollection = new PointCollection(points.Length); pathFigure.StartPoint = new Point(points[0].X, points[0].Y); PathGeometry myPathGeometry = new PathGeometry(); PathSegment pathSegment; if (points.Length == 2) { pathSegment = new LineSegment(); ((LineSegment)pathSegment).Point = new Point(points[1].X, points[1].Y); } else if (points.Length == 3) { pathSegment = new QuadraticBezierSegment(); ((QuadraticBezierSegment)pathSegment).Point1 = new Point(points[1].X, points[1].Y); ((QuadraticBezierSegment)pathSegment).Point2 = new Point(points[2].X, points[2].Y); } else if (points.Length == 4) { for (int i = 1; i < points.Length; i++) { pointCollection.Add(points[i]); } pathSegment = new PolyBezierSegment(); ((PolyBezierSegment)pathSegment).Points = pointCollection; } else { return null; } PathSegmentCollection pathSegmentCollection = new PathSegmentCollection(); pathSegmentCollection.Add(pathSegment); pathFigure.Segments = pathSegmentCollection; PathFigureCollection pathFigureCollection = new PathFigureCollection(); pathFigureCollection.Add(pathFigure); myPathGeometry.Figures = pathFigureCollection; return myPathGeometry; }
public void Show() { Color pixClr = new Color(); pixClr.A = 255; pixClr.R = byte.Parse(PixelColor.Substring(0, 2), System.Globalization.NumberStyles.HexNumber); pixClr.G = byte.Parse(PixelColor.Substring(2, 2), System.Globalization.NumberStyles.HexNumber); pixClr.B = byte.Parse(PixelColor.Substring(4, 2), System.Globalization.NumberStyles.HexNumber); RandomNumber = new Random(); for (int i = 0; i < 100; i++) { int xval = RandomNumber.Next((int)Width); int yval = RandomNumber.Next((int)Height); int xRval = xval+RandomNumber.Next(-20,20); int yRval = yval + RandomNumber.Next(-20, 20); int xR2val = xRval + RandomNumber.Next(-20, 20); int yR2val = yRval + RandomNumber.Next(-20, 20); Point startingPt = new Point(xval, yval); Point randomPt = new Point(xRval, yRval); Point randomPt2 = new Point(xR2val, yR2val); Path pixel = new Path(); PathFigure pixelFigure = new PathFigure(); GeometryGroup geometry = new GeometryGroup(); LineSegment line1 = new LineSegment(); pixelFigure.StartPoint = startingPt; line1.Point = randomPt; LineSegment line2 = new LineSegment(); line2.Point = randomPt2; LineSegment line3 = new LineSegment(); line3.Point = startingPt; pixelFigure.Segments.Add(line1); pixelFigure.Segments.Add(line2); pixelFigure.Segments.Add(line3); pixel.Stroke = new SolidColorBrush(pixClr); pixel.Fill = new SolidColorBrush(pixClr); // pixel.Stretch = Stretch.Fill; PathGeometry pathGeo = new PathGeometry(); pathGeo.Figures.Add(pixelFigure); pixel.Data = pathGeo; ExplosionEffect.Children.Add(pixel); } }
/// <summary> /// Adds a polygon to a <see cref="PathGeometry"/>. /// </summary> /// <param name="pathGeometry">The <see cref="PathGeometry"/>.</param> /// <param name="points">The points on the polygon.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="pathGeometry"/> is <see langword="null"/>. /// </exception> public static void AddPolygon(this PathGeometry pathGeometry, params Point[] points) { if (pathGeometry == null) throw new ArgumentNullException(nameof(pathGeometry)); if (points == null || points.Length <= 1) return; var pathFigure = new PathFigure { StartPoint = points[0] }; for (int i = 1; i < points.Length; i++) { var lineSegment = new LineSegment { Point = points[i] }; pathFigure.Segments.Add(lineSegment); } pathGeometry.Figures.Add(pathFigure); }
public override void OnApplyTemplate() { base.OnApplyTemplate(); this.Root = base.GetTemplateChild("Root") as Border; this.ArrowRow = base.GetTemplateChild("ArrowRow") as RowDefinition; this.ToolTipPathFigure = base.GetTemplateChild("ToolTipPathFigure") as PathFigure; this.BottomCenterLeft = base.GetTemplateChild("BottomCenterLeft") as LineSegment; this.BottomLeftCorner1 = base.GetTemplateChild("BottomLeftCorner1") as LineSegment; this.BottomLeftCorner2 = base.GetTemplateChild("BottomLeftCorner2") as ArcSegment; this.TopLeftCorner1 = base.GetTemplateChild("TopLeftCorner1") as LineSegment; this.TopLeftCorner2 = base.GetTemplateChild("TopLeftCorner2") as ArcSegment; this.TopRightCorner1 = base.GetTemplateChild("TopRightCorner1") as LineSegment; this.TopRightCorner2 = base.GetTemplateChild("TopRightCorner2") as ArcSegment; this.BottomRightCorner1 = base.GetTemplateChild("BottomRightCorner1") as LineSegment; this.BottomRightCorner2 = base.GetTemplateChild("BottomRightCorner2") as ArcSegment; this.BottomCenterRight = base.GetTemplateChild("BottomCenterRight") as LineSegment; }
public ArrowControl() { endPt1 = new BezierSegment(); endPt2 = new LineSegment(); arrowPt1 = new LineSegment(); arrowPt2 = new LineSegment(); headPt = new LineSegment(); startPt2 = new BezierSegment(); startPt1 = new PathFigure() { Segments = new PathSegmentCollection() { endPt1, arrowPt1, headPt, arrowPt2, endPt2, startPt2 }, IsClosed = true }; Shape = new Path() { Data = new PathGeometry() { Figures = new PathFigureCollection() { startPt1 } } }; Shape.Stroke = Brushes.Red; Shape.Fill = fillBrush; }
void ClippedGrid_SizeChanged(object sender, SizeChangedEventArgs e) { double w = this.ActualWidth; double h = this.ActualHeight; PathFigure figure = new PathFigure(); figure.StartPoint = new Point(0, h); LineSegment left = new LineSegment(); left.Point = new Point(0, _arcSizeY + _offsetY); figure.Segments.Add(left); ArcSegment topLeftRounding = new ArcSegment(); topLeftRounding.Size = new Size(_arcSizeX, _arcSizeY); topLeftRounding.RotationAngle = 0; topLeftRounding.IsLargeArc = false; topLeftRounding.SweepDirection = SweepDirection.Clockwise; topLeftRounding.Point = new Point(_arcSizeX, _offsetY); figure.Segments.Add(topLeftRounding); LineSegment top = new LineSegment(); top.Point = new Point(w - _arcSizeX, _offsetY); figure.Segments.Add(top); ArcSegment topRightRounding = new ArcSegment(); topRightRounding.Size = new Size(_arcSizeX, _arcSizeY); topRightRounding.RotationAngle = 0; topRightRounding.IsLargeArc = false; topRightRounding.SweepDirection = SweepDirection.Clockwise; topRightRounding.Point = new Point(w, _arcSizeY + _offsetY); figure.Segments.Add(topRightRounding); LineSegment right = new LineSegment(); right.Point = new Point(w, h); figure.Segments.Add(right); LineSegment bottom = new LineSegment(); bottom.Point = new Point(0, h); figure.Segments.Add(bottom); PathGeometry clip = new PathGeometry(); clip.Figures.Add(figure); this.Clip = clip; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.vis_line = ((System.Windows.Shapes.Path)(target)); return; case 2: this.Edg_start_point = ((System.Windows.Media.PathFigure)(target)); return; case 3: this.Edg_end_point = ((System.Windows.Media.LineSegment)(target)); return; } this._contentLoaded = true; }
static InsertionAdorner() { InsertionAdorner.pen.Freeze(); LineSegment lineSegment1 = new LineSegment(new Point(0.0, -5.0), false); lineSegment1.Freeze(); LineSegment lineSegment2 = new LineSegment(new Point(0.0, 5.0), false); lineSegment2.Freeze(); PathFigure pathFigure = new PathFigure() { StartPoint = new Point(5.0, 0.0) }; pathFigure.Segments.Add((PathSegment) lineSegment1); pathFigure.Segments.Add((PathSegment) lineSegment2); pathFigure.Freeze(); InsertionAdorner.triangle = new PathGeometry(); InsertionAdorner.triangle.Figures.Add(pathFigure); InsertionAdorner.triangle.Freeze(); }
public override DocumentPage GetPage(int pageNumber) { DocumentPage page = m_Paginator.GetPage(pageNumber); // Create a wrapper visual for transformation and add extras ContainerVisual newpage = new ContainerVisual(); DrawingVisual title = new DrawingVisual(); using (DrawingContext ctx = title.RenderOpen()) { if (m_Typeface == null) { m_Typeface = new Typeface("Times New Roman"); } LineSegment line = new LineSegment(new Point(100, 570), false); FormattedText titleText = new FormattedText("Список устройств конфигурации", CultureInfo.CurrentCulture, FlowDirection.LeftToRight, m_Typeface, 20, Brushes.Black); FormattedText text = new FormattedText("Страница " + (pageNumber + 1), CultureInfo.CurrentCulture, FlowDirection.LeftToRight, m_Typeface, 14, Brushes.Black); FormattedText textDate = new FormattedText(_dateTime.ToString(), CultureInfo.CurrentCulture, FlowDirection.LeftToRight, m_Typeface, 14, Brushes.Black); var pen = new Pen(); pen.Brush = Brushes.Black; pen.Thickness = 2; ctx.DrawLine(pen, new Point(10, 570), new Point(650, 570)); ctx.DrawText(text, new Point(580, 580)); ctx.DrawText(textDate, new Point(10, 580)); if (pageNumber == 0) ctx.DrawText(titleText, new Point(200, 5)); } //DrawingVisual background = new DrawingVisual(); //using (DrawingContext ctx = background.RenderOpen()) //{ // ctx.DrawRectangle(new SolidColorBrush(Color.FromRgb(240, 240, 240)), null, page.ContentBox); //} //newpage.Children.Add(background); // Scale down page and center ContainerVisual smallerPage = new ContainerVisual(); smallerPage.Children.Add(page.Visual); smallerPage.Transform = new MatrixTransform(0.95, 0, 0, 0.95, 0.025 * page.ContentBox.Width, 0.025 * page.ContentBox.Height); newpage.Children.Add(smallerPage); newpage.Children.Add(title); newpage.Transform = new TranslateTransform(m_Margin.Width, m_Margin.Height); return new DocumentPage(newpage, m_PageSize, Move(page.BleedBox), Move(page.ContentBox)); }
private void CreateAutoShape(object sender, RoutedEventArgs e) { PathGeometry sendingPath = new PathGeometry(); PathFigure pathFigure = new PathFigure(); pathFigure.StartPoint = new Point(47.7778, 48.6667); pathFigure.IsClosed = true; LineSegment lineSegment1 = new LineSegment(); lineSegment1.Point = new Point(198, 48.6667); pathFigure.Segments.Add(lineSegment1); LineSegment lineSegment2 = new LineSegment(); lineSegment2.Point = new Point(198, 102); pathFigure.Segments.Add(lineSegment2); BezierSegment bezierSegment1 = new BezierSegment(); bezierSegment1.Point1 = new Point(174.889, 91.3334); bezierSegment1.Point2 = new Point(157.111, 79.7778); bezierSegment1.Point3 = new Point(110.889, 114.444); pathFigure.Segments.Add(bezierSegment1); BezierSegment bezierSegment2 = new BezierSegment(); bezierSegment2.Point1 = new Point(64.667, 149.111); bezierSegment2.Point2 = new Point(58.4444, 130.444); bezierSegment2.Point3 = new Point(47.7778, 118.889); pathFigure.Segments.Add(bezierSegment2); sendingPath.Figures.Add(pathFigure); PathGeometry pathGeometry = new PathGeometry(); if (sendingPath.FillRule != null) pathGeometry.FillRule = sendingPath.FillRule; else pathGeometry.FillRule = FillRule.Nonzero; pathGeometry.Figures = sendingPath.Figures; var newThumb = new SandRibbonInterop.AutoShape(); var safePathGeometry = (Geometry)(new GeometryConverter().ConvertFromString(pathGeometry.ToString())); var safePathData = new PathGeometry(); safePathData.AddGeometry(safePathGeometry); newThumb.PathData = safePathData; newThumb.Background = Brushes.LightGreen; newThumb.Foreground = Brushes.Green; newThumb.StrokeThickness = 5; newThumb.Height = 100; newThumb.Width = 100; Commands.AddAutoShape.Execute(newThumb); }
/// <summary> /// see http://stackoverflow.com/questions/5188877/how-to-have-arrow-symbol-on-a-line-in-c-wpf /// </summary> /// <param name="p1"></param> /// <param name="p2"></param> /// <param name="fillBrush"></param> /// <param name="thickness"></param> /// <returns></returns> public static Shape DrawLinkArrow(Point p1, Point p2, Brush fillBrush, double thickness = 3.0d) { GeometryGroup lineGroup = new GeometryGroup(); double theta = Math.Atan2((p2.Y - p1.Y), (p2.X - p1.X)) * 180 / Math.PI; PathGeometry pathGeometry = new PathGeometry(); PathFigure pathFigure = new PathFigure(); Point p = new Point(p1.X + ((p2.X - p1.X) / 1.35), p1.Y + ((p2.Y - p1.Y) / 1.35)); pathFigure.StartPoint = p; Point lpoint = new Point(p.X + 6, p.Y + 15); Point rpoint = new Point(p.X - 6, p.Y + 15); LineSegment seg1 = new LineSegment(); seg1.Point = lpoint; pathFigure.Segments.Add(seg1); LineSegment seg2 = new LineSegment(); seg2.Point = rpoint; pathFigure.Segments.Add(seg2); LineSegment seg3 = new LineSegment(); seg3.Point = p; pathFigure.Segments.Add(seg3); pathGeometry.Figures.Add(pathFigure); RotateTransform transform = new RotateTransform(); transform.Angle = theta + 90; transform.CenterX = p.X; transform.CenterY = p.Y; pathGeometry.Transform = transform; lineGroup.Children.Add(pathGeometry); LineGeometry connectorGeometry = new LineGeometry(); connectorGeometry.StartPoint = p1; connectorGeometry.EndPoint = p2; lineGroup.Children.Add(connectorGeometry); System.Windows.Shapes.Path path = new System.Windows.Shapes.Path(); path.Data = lineGroup; path.StrokeThickness = thickness; path.Stroke = path.Fill = fillBrush; return path; }
public static PathFigure GetPathFigureFromPoints(IEnumerable <Point> linePoints) { var pf = new PathFigure(); System.Windows.Media.PathSegmentCollection ls = new System.Windows.Media.PathSegmentCollection(); var start = linePoints.First(); { foreach (var p in linePoints.Skip(1)) { var lineSegement = new System.Windows.Media.LineSegment(p, true); ls.Add(lineSegement); } } pf.StartPoint = start; pf.Segments = ls; pf.IsClosed = false; pf.IsFilled = false; return(pf); }
/// <summary> /// Initializes static members of the <see cref="InsertionAdorner" /> class. /// </summary> static InsertionAdorner() { // Create the pen and triangle in a static constructor and freeze them to improve performance. Pen = new Pen { Brush = Brushes.Gray, Thickness = 2 }; Pen.Freeze(); var firstLine = new LineSegment(new Point(0, -5), false); firstLine.Freeze(); var secondLine = new LineSegment(new Point(0, 5), false); secondLine.Freeze(); var figure = new PathFigure { StartPoint = new Point(5, 0) }; figure.Segments.Add(firstLine); figure.Segments.Add(secondLine); figure.Freeze(); Triangle = new PathGeometry(); Triangle.Figures.Add(figure); Triangle.Freeze(); }
static InsertionAdorner() { Pen = new Pen { Brush = new SolidColorBrush(Color.FromRgb(48, 48, 48)), Thickness = 2 }; Pen.Freeze(); var firstLine = new LineSegment(new Point(0, -5), false); firstLine.Freeze(); var secondLine = new LineSegment(new Point(0, 5), false); secondLine.Freeze(); var figure = new PathFigure { StartPoint = new Point(5, 0) }; figure.Segments.Add(firstLine); figure.Segments.Add(secondLine); figure.Freeze(); Triangle = new PathGeometry(); Triangle.Figures.Add(figure); Triangle.Freeze(); }
/// <summary> /// Returns a Windows Media Path Geometry from a Rhinocommon Polyline /// </summary> /// <param name="input">Rhinocommon Polyline</param> /// <returns>System Windows Media Path Geometry</returns> public static Sm.PathGeometry ToGeometry(this Rg.Polyline input) { Sm.PathFigure figure = new Sm.PathFigure(); Sm.PathGeometry geometry = new Sm.PathGeometry(); Sm.PathFigureCollection figureCollection = new Sm.PathFigureCollection(); Sm.PathSegmentCollection segmentCollection = new Sm.PathSegmentCollection(); figure.StartPoint = input[0].ToWindowsPoint(); for (int i = 1; i < input.Count; i++) { Sm.LineSegment line = new Sm.LineSegment(input[i].ToWindowsPoint(), true); segmentCollection.Add(line); } figure.Segments = segmentCollection; figureCollection.Add(figure); geometry.Figures = figureCollection; return(geometry); }
protected override Path CreateShape() { var result = base.CreateShape(); Side1 = new LineSegment(); Side2 = new LineSegment(); PolygonPart = new PathFigure() { IsClosed = false, IsFilled = true, Segments = new PathSegmentCollection() { Side1, Side2 } }; (result.Data as PathGeometry).Figures.Add(PolygonPart); result.StrokeEndLineCap = PenLineCap.Round; result.StrokeStartLineCap = PenLineCap.Round; return result; }
public static PathGeometry PathGeometryFromCurve(Curve curve, MatrixTransform graphToCanvas) { double xScale, xOffset, yScale, yOffset; if (graphToCanvas != null) { xScale = graphToCanvas.Matrix.M11; xOffset = graphToCanvas.Matrix.OffsetX; yScale = graphToCanvas.Matrix.M22; yOffset = graphToCanvas.Matrix.OffsetY; } else { xScale = 1; xOffset = 0; yScale = 1; yOffset = 0; } PathGeometry pathGeometry = new PathGeometry(); if (curve.x.Count() == 0) return pathGeometry; PathFigure pathFigure = new PathFigure(); LineSegment lineSegment; double xCanvas = curve.xTransformed[0] * xScale + xOffset; double yCanvas = curve.yTransformed[0] * yScale + yOffset; pathFigure.StartPoint = new Point(xCanvas, yCanvas); for (int i = 1; i < curve.x.Count(); ++i) { if (curve.includeLinePoint[i]) { lineSegment = new LineSegment(); xCanvas = curve.xTransformed[i] * xScale + xOffset; yCanvas = curve.yTransformed[i] * yScale + yOffset; lineSegment.Point = new Point(xCanvas, yCanvas); pathFigure.Segments.Add(lineSegment); } } pathFigure.IsClosed = false; pathGeometry.Figures.Add(pathFigure); return pathGeometry; }
/// <summary> /// Default constructor. /// </summary> public SurfaceWindow1() { InitializeComponent(); Path myShape = new Path(); myShape.StrokeThickness = 3.0; myShape.Fill = System.Windows.Media.Brushes.Wheat; myShape.Stroke = System.Windows.Media.Brushes.BlueViolet; PathGeometry myGeometry = new PathGeometry(); PathFigure figure = new PathFigure(); //Figure draws the segments upside down (this the coordinate system in negatives to draw objects) Double width = 200; Double height = 100; figure.SetValue(PathFigure.StartPointProperty, new Point(height, 0)); ArcSegment arc = new ArcSegment(new Point(height, height), new Size(height / 2, height / 2), 0.0, true, SweepDirection.Counterclockwise, true); //Note: LineSegments take end point as the constructor, Their Start point will be the end point of previous segment(the order you added into path figure(Source API)) LineSegment arcVertical1 = new LineSegment(new Point(height, height - 25), true); LineSegment horizontal1 = new LineSegment(new Point(height + 275, height - 25), true); LineSegment vertical = new LineSegment(new Point(height + 275, 25), true); LineSegment horizontal2 = new LineSegment(new Point(height, 25), true); LineSegment arcVertical2 = new LineSegment(new Point(height, 0), true); figure.Segments.Add(arc); figure.Segments.Add(arcVertical1); figure.Segments.Add(horizontal1); figure.Segments.Add(vertical); figure.Segments.Add(horizontal2); figure.Segments.Add(arcVertical2); myGeometry.Figures.Add(figure); myShape.Data = myGeometry; myCanvas.Children.Add(myShape); //****************************** Register for Stroke change events************************* // This is how we can get the currently being drawn stroke information inkCanvas.Strokes.StrokesChanged += new StrokeCollectionChangedEventHandler(canvasStrokesChanged); // Add handlers for window availability events AddWindowAvailabilityHandlers(); }
/// <summary> /// FinishSegment - called to completed any outstanding Segment which may be present. /// </summary> private void FinishSegment() { if (_currentSegmentPoints != null) { Debug.Assert(_currentFigure != null); int count = _currentSegmentPoints.Count; Debug.Assert(count > 0); // Is this the first segment? if (_segments == null) { // While we could always just retrieve _currentFigure.Segments (which would auto-promote) // it's more efficient to create the collection ourselves and set it explicitly. _segments = new PathSegmentCollection(); _currentFigure.Segments = _segments; } PathSegment segment; switch (_currentSegmentType) { case MIL_SEGMENT_TYPE.MilSegmentPolyLine: if (count == 1) { LineSegment lSegment = new LineSegment(); lSegment.Point = _currentSegmentPoints[0]; segment = lSegment; } else { PolyLineSegment pSegment = new PolyLineSegment(); pSegment.Points = _currentSegmentPoints; segment = pSegment; } break; case MIL_SEGMENT_TYPE.MilSegmentPolyBezier: if (count == 3) { BezierSegment bSegment = new BezierSegment(); bSegment.Point1 = _currentSegmentPoints[0]; bSegment.Point2 = _currentSegmentPoints[1]; bSegment.Point3 = _currentSegmentPoints[2]; segment = bSegment; } else { Debug.Assert(count % 3 == 0); PolyBezierSegment pSegment = new PolyBezierSegment(); pSegment.Points = _currentSegmentPoints; segment = pSegment; } break; case MIL_SEGMENT_TYPE.MilSegmentPolyQuadraticBezier: if (count == 2) { QuadraticBezierSegment qSegment = new QuadraticBezierSegment(); qSegment.Point1 = _currentSegmentPoints[0]; qSegment.Point2 = _currentSegmentPoints[1]; segment = qSegment; } else { Debug.Assert(count % 2 == 0); PolyQuadraticBezierSegment pSegment = new PolyQuadraticBezierSegment(); pSegment.Points = _currentSegmentPoints; segment = pSegment; } break; default: segment = null; Debug.Assert(false); break; } // Handle common PathSegment properties. if (_currentSegmentIsStroked != s_defaultValueForPathSegmentIsStroked) { segment.IsStroked = _currentSegmentIsStroked; } if (_currentSegmentIsSmoothJoin != s_defaultValueForPathSegmentIsSmoothJoin) { segment.IsSmoothJoin = _currentSegmentIsSmoothJoin; } _segments.Add(segment); _currentSegmentPoints = null; _currentSegmentType = MIL_SEGMENT_TYPE.MilSegmentNone; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this._grid = ((System.Windows.Controls.Grid)(target)); return; case 2: this._ellipseOuterDial = ((System.Windows.Shapes.Ellipse)(target)); return; case 3: this._ellipseInnerDial = ((System.Windows.Shapes.Ellipse)(target)); return; case 4: this._pointerCircle = ((System.Windows.Shapes.Ellipse)(target)); return; case 5: this._markerTranslation = ((System.Windows.Media.TranslateTransform)(target)); return; case 6: this._pointerStandard = ((System.Windows.Shapes.Path)(target)); return; case 7: this._pointerTopLeft = ((System.Windows.Media.LineSegment)(target)); return; case 8: this._pointerTopRight = ((System.Windows.Media.LineSegment)(target)); return; case 9: this._pointerTip = ((System.Windows.Media.LineSegment)(target)); return; case 10: this._pointerBottomRight = ((System.Windows.Media.LineSegment)(target)); return; case 11: this._pointerBottomLeft = ((System.Windows.Media.LineSegment)(target)); return; case 12: this._pointerArrow = ((System.Windows.Shapes.Path)(target)); return; case 13: this._pointerArrowTopLeft = ((System.Windows.Media.LineSegment)(target)); return; case 14: this._pointerArrowTip = ((System.Windows.Media.LineSegment)(target)); return; case 15: this._pointerArrowBottomLeft = ((System.Windows.Media.LineSegment)(target)); return; case 16: this._pointerRectangle = ((System.Windows.Shapes.Path)(target)); return; case 17: this._pointerRectangleTopLeft = ((System.Windows.Media.LineSegment)(target)); return; case 18: this._pointerRectangleTopRight = ((System.Windows.Media.LineSegment)(target)); return; case 19: this._pointerRectangleBottomRight = ((System.Windows.Media.LineSegment)(target)); return; case 20: this._pointerRectangleBottomLeft = ((System.Windows.Media.LineSegment)(target)); return; case 21: this._pointerAxle = ((System.Windows.Shapes.Path)(target)); return; case 22: this._pointerPathFigure = ((System.Windows.Media.PathFigure)(target)); return; case 23: this._pointerAxleArc1 = ((System.Windows.Media.ArcSegment)(target)); return; case 24: this._pointerAxleArc2 = ((System.Windows.Media.ArcSegment)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControl = ((Prototype_05.ModelItem)(target)); return; case 2: this.MainGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.BackgroundPathBottomLeftCorner = ((System.Windows.Media.LineSegment)(target)); return; case 4: this.BackgroundPathBottomRightCorner = ((System.Windows.Media.LineSegment)(target)); return; case 5: this.HeaderGrid = ((System.Windows.Controls.Grid)(target)); return; case 6: this.TitleHeader = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.DataGrid = ((System.Windows.Controls.Grid)(target)); return; case 8: this.Data_InfoGrid = ((System.Windows.Controls.Grid)(target)); return; case 9: this.TitleData = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.Id = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.Type = ((System.Windows.Controls.TextBox)(target)); return; case 12: this.Duration = ((System.Windows.Controls.TextBox)(target)); return; case 13: this.InstancesAmountButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 112 "..\..\..\ModelItem.xaml" this.InstancesAmountButton.Click += new System.Windows.RoutedEventHandler(this.InstanceAmountClicked); #line default #line hidden return; case 14: this.Instances = ((System.Windows.Controls.TextBox)(target)); return; case 15: this.Categories = ((System.Windows.Controls.TextBox)(target)); return; case 16: this.ParameterTitle1 = ((System.Windows.Controls.TextBox)(target)); return; case 17: this.ParameterTitle2 = ((System.Windows.Controls.TextBox)(target)); return; case 18: this.ParameterTitle3 = ((System.Windows.Controls.TextBox)(target)); return; case 19: this.ParameterValue1 = ((System.Windows.Controls.TextBox)(target)); return; case 20: this.ParameterValue2 = ((System.Windows.Controls.TextBox)(target)); return; case 21: this.ParameterValue3 = ((System.Windows.Controls.TextBox)(target)); return; case 22: #line 130 "..\..\..\ModelItem.xaml" ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DataExpandReduceClick); #line default #line hidden return; case 23: this.Data_TopArrow = ((System.Windows.Shapes.Path)(target)); return; case 24: this.Data_BottomArrow = ((System.Windows.Shapes.Path)(target)); return; case 25: this.HistoryGrid = ((System.Windows.Controls.Grid)(target)); return; case 26: #line 180 "..\..\..\ModelItem.xaml" ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)).Click += new System.Windows.RoutedEventHandler(this.HistoryExpandReduceClick); #line default #line hidden return; case 27: this.History_TopArrow = ((System.Windows.Shapes.Path)(target)); return; case 28: this.History_BottomArrow = ((System.Windows.Shapes.Path)(target)); return; case 29: this.History_InfoGrid = ((System.Windows.Controls.Grid)(target)); return; case 30: this.MHC1 = ((Prototype_05.ModelHistoryControl)(target)); return; case 31: this.MHC2 = ((Prototype_05.ModelHistoryControl)(target)); return; case 32: this.MHC3 = ((Prototype_05.ModelHistoryControl)(target)); return; case 33: this.MHC4 = ((Prototype_05.ModelHistoryControl)(target)); return; case 34: this.ScaleGrid = ((System.Windows.Controls.Grid)(target)); return; case 35: this.ModelGrid = ((System.Windows.Controls.Grid)(target)); return; case 36: this.Model_ExpandReduceButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 271 "..\..\..\ModelItem.xaml" this.Model_ExpandReduceButton.Click += new System.Windows.RoutedEventHandler(this.ModelExpandReduceClick); #line default #line hidden return; case 37: this.Model_TopArrow = ((System.Windows.Shapes.Path)(target)); return; case 38: this.Model_BottomArrow = ((System.Windows.Shapes.Path)(target)); return; case 39: this.Model_InfoGrid = ((System.Windows.Controls.Grid)(target)); return; case 40: this.ImageRow = ((System.Windows.Controls.RowDefinition)(target)); return; case 41: this.ImageColumn = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 42: this.ModelImg = ((System.Windows.Controls.Image)(target)); return; case 43: this.ScaleButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 355 "..\..\..\ModelItem.xaml" this.ScaleButton.PreviewTouchMove += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.ScaleButtonMoved); #line default #line hidden #line 355 "..\..\..\ModelItem.xaml" this.ScaleButton.PreviewTouchDown += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.ScaleButtonDown); #line default #line hidden #line 355 "..\..\..\ModelItem.xaml" this.ScaleButton.PreviewTouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.ScaleButtonUp); #line default #line hidden return; case 44: this.ScaleButton_Grid = ((System.Windows.Controls.Grid)(target)); return; case 45: this.ScaleArea = ((System.Windows.Shapes.Rectangle)(target)); return; case 46: this.ScaleText = ((System.Windows.Controls.TextBox)(target)); return; case 47: this.ScaleOneWayImg = ((System.Windows.Controls.Image)(target)); return; case 48: this.ScaleTwoWayImg = ((System.Windows.Controls.Image)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControl = ((Prototype_05.InstancePropertyPanel)(target)); return; case 2: this.MainGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.CategoryGrid = ((System.Windows.Controls.Grid)(target)); #line 27 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.CategoryGrid.PreviewTouchDown += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.NavigationTouchDown); #line default #line hidden #line 27 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.CategoryGrid.PreviewTouchMove += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.NavigationTouchMove); #line default #line hidden #line 27 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.CategoryGrid.PreviewTouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.NavigationTouchUp); #line default #line hidden return; case 4: this.Category0Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 5: this.Category0Text = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.BackgroundPathBottomLeftCorner = ((System.Windows.Media.LineSegment)(target)); return; case 7: this.BackgroundPathBottomRightCorner = ((System.Windows.Media.LineSegment)(target)); return; case 8: this.HeaderGrid = ((System.Windows.Controls.Grid)(target)); return; case 9: this.TitleHeader = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.DataGrid = ((System.Windows.Controls.Grid)(target)); return; case 11: this.Data_InfoGrid = ((System.Windows.Controls.Grid)(target)); return; case 12: this.ModelButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 123 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.ModelButton.Click += new System.Windows.RoutedEventHandler(this.BoundModelClicked); #line default #line hidden return; case 13: this.ModelText = ((System.Windows.Controls.TextBox)(target)); return; case 14: this.StateText = ((System.Windows.Controls.TextBox)(target)); return; case 15: this.IdText = ((System.Windows.Controls.TextBox)(target)); return; case 16: this.StartTimeText = ((System.Windows.Controls.TextBox)(target)); return; case 17: this.EndTimeText = ((System.Windows.Controls.TextBox)(target)); return; case 18: this.CurrentStep_Data_Button = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 137 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.CurrentStep_Data_Button.Click += new System.Windows.RoutedEventHandler(this.CurrentStepClicked); #line default #line hidden return; case 19: this.CStepText = ((System.Windows.Controls.TextBox)(target)); return; case 20: this.ParameterTitle1 = ((System.Windows.Controls.TextBox)(target)); return; case 21: this.ParameterTitle2 = ((System.Windows.Controls.TextBox)(target)); return; case 22: this.ParameterTitle3 = ((System.Windows.Controls.TextBox)(target)); return; case 23: this.ParameterValue1 = ((System.Windows.Controls.TextBox)(target)); return; case 24: this.ParameterValue2 = ((System.Windows.Controls.TextBox)(target)); return; case 25: this.ParameterValue3 = ((System.Windows.Controls.TextBox)(target)); return; case 26: #line 154 "..\..\..\..\Panels\InstancePropertyPanel.xaml" ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)).Click += new System.Windows.RoutedEventHandler(this.DataExpandReduceClick); #line default #line hidden return; case 27: this.Data_TopArrow = ((System.Windows.Shapes.Path)(target)); return; case 28: this.Data_BottomArrow = ((System.Windows.Shapes.Path)(target)); return; case 29: this.HistoryGrid = ((System.Windows.Controls.Grid)(target)); return; case 30: #line 208 "..\..\..\..\Panels\InstancePropertyPanel.xaml" ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)).Click += new System.Windows.RoutedEventHandler(this.HistoryExpandReduceClick); #line default #line hidden return; case 31: this.History_TopArrow = ((System.Windows.Shapes.Path)(target)); return; case 32: this.History_BottomArrow = ((System.Windows.Shapes.Path)(target)); return; case 33: this.History_InfoGrid = ((System.Windows.Controls.Grid)(target)); return; case 34: this.CurrentStep_Protocol_Button = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 269 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.CurrentStep_Protocol_Button.Click += new System.Windows.RoutedEventHandler(this.CurrentStepClicked); #line default #line hidden return; case 35: this.CStepText_P = ((System.Windows.Controls.TextBox)(target)); return; case 36: this.NextStep_Protocol_Button = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 273 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.NextStep_Protocol_Button.Click += new System.Windows.RoutedEventHandler(this.NextStepClicked); #line default #line hidden return; case 37: this.NStepText_P = ((System.Windows.Controls.TextBox)(target)); return; case 38: this.ProgressBar = ((System.Windows.Controls.ProgressBar)(target)); return; case 39: this.ISP0 = ((Prototype_05.InstanceStepProtocol)(target)); return; case 40: this.ISP1 = ((Prototype_05.InstanceStepProtocol)(target)); return; case 41: this.ISP2 = ((Prototype_05.InstanceStepProtocol)(target)); return; case 42: this.ISP3 = ((Prototype_05.InstanceStepProtocol)(target)); return; case 43: this.ScaleGrid = ((System.Windows.Controls.Grid)(target)); return; case 44: this.ModelGrid = ((System.Windows.Controls.Grid)(target)); return; case 45: this.Model_ExpandReduceButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 327 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.Model_ExpandReduceButton.Click += new System.Windows.RoutedEventHandler(this.ModelExpandReduceClick); #line default #line hidden return; case 46: this.Model_TopArrow = ((System.Windows.Shapes.Path)(target)); return; case 47: this.Model_BottomArrow = ((System.Windows.Shapes.Path)(target)); return; case 48: this.Model_InfoGrid = ((System.Windows.Controls.Grid)(target)); return; case 49: this.ImageRow = ((System.Windows.Controls.RowDefinition)(target)); return; case 50: this.ImageColumn = ((System.Windows.Controls.ColumnDefinition)(target)); return; case 51: this.ModelImg = ((System.Windows.Controls.Image)(target)); return; case 52: this.ModelNameText = ((System.Windows.Controls.TextBox)(target)); return; case 53: this.ScaleButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 409 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.ScaleButton.PreviewTouchMove += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.ScaleButtonMoved); #line default #line hidden #line 409 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.ScaleButton.PreviewTouchDown += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.ScaleButtonDown); #line default #line hidden #line 409 "..\..\..\..\Panels\InstancePropertyPanel.xaml" this.ScaleButton.PreviewTouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.ScaleButtonUp); #line default #line hidden return; case 54: this.ScaleButton_Grid = ((System.Windows.Controls.Grid)(target)); return; case 55: this.ScaleArea = ((System.Windows.Shapes.Rectangle)(target)); return; case 56: this.ScaleText = ((System.Windows.Controls.TextBox)(target)); return; case 57: this.ScaleOneWayImg = ((System.Windows.Controls.Image)(target)); return; case 58: this.ScaleTwoWayImg = ((System.Windows.Controls.Image)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControl = ((Prototype_05.ModelOverviewArea)(target)); #line 12 "..\..\ModelOverviewArea.xaml" this.UserControl.Loaded += new System.Windows.RoutedEventHandler(this.AreaLoaded); #line default #line hidden return; case 2: this.MainGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.HidePointTL = ((System.Windows.Media.PathFigure)(target)); return; case 4: this.HidePointTR = ((System.Windows.Media.LineSegment)(target)); return; case 5: this.HidePointBR = ((System.Windows.Media.LineSegment)(target)); return; case 6: this.HidePointBL = ((System.Windows.Media.LineSegment)(target)); return; case 7: this.ShowOrHideImage = ((System.Windows.Controls.Image)(target)); return; case 8: this.ShowOrHideText = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.ShowHideButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 75 "..\..\ModelOverviewArea.xaml" this.ShowHideButton.PreviewTouchDown += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.ShowHideTouchDown); #line default #line hidden #line 75 "..\..\ModelOverviewArea.xaml" this.ShowHideButton.PreviewTouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.ShowHideTouchUp); #line default #line hidden return; case 10: this.BorderPointBL = ((System.Windows.Media.LineSegment)(target)); return; case 11: this.BorderPointBR = ((System.Windows.Media.LineSegment)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControl = ((Prototype_05.ModelRemovingPanel)(target)); return; case 2: this.MainGrid = ((System.Windows.Controls.Grid)(target)); #line 14 "..\..\..\..\Panels\ModelRemovingPanel.xaml" this.MainGrid.PreviewTouchDown += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.OptionTouchDown); #line default #line hidden #line 14 "..\..\..\..\Panels\ModelRemovingPanel.xaml" this.MainGrid.PreviewTouchMove += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.OptionTouchMove); #line default #line hidden #line 14 "..\..\..\..\Panels\ModelRemovingPanel.xaml" this.MainGrid.PreviewTouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.OptionTouchUp); #line default #line hidden return; case 3: this.TitleHeader = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.MarkingButtonGrid = ((System.Windows.Controls.Grid)(target)); return; case 5: this.ModelsGrid = ((System.Windows.Controls.Grid)(target)); return; case 6: this.CategoryGrid = ((System.Windows.Controls.Grid)(target)); return; case 7: this.Category0Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 8: this.Category1Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 9: this.Category2Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 10: this.Category3Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 11: this.Category4Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 12: this.Category0Image = ((System.Windows.Controls.Image)(target)); return; case 13: this.Category1Image = ((System.Windows.Controls.Image)(target)); return; case 14: this.Category2Image = ((System.Windows.Controls.Image)(target)); return; case 15: this.Category3Image = ((System.Windows.Controls.Image)(target)); return; case 16: this.Category4Image = ((System.Windows.Controls.Image)(target)); return; case 17: this.Category0Text = ((System.Windows.Controls.TextBox)(target)); return; case 18: this.Category1Text = ((System.Windows.Controls.TextBox)(target)); return; case 19: this.Category2Text = ((System.Windows.Controls.TextBox)(target)); return; case 20: this.Category3Text = ((System.Windows.Controls.TextBox)(target)); return; case 21: this.Category4Text = ((System.Windows.Controls.TextBox)(target)); return; case 22: this.Category0AmountTextB = ((System.Windows.Controls.TextBlock)(target)); return; case 23: this.Category1AmountTextB = ((System.Windows.Controls.TextBlock)(target)); return; case 24: this.Category2AmountTextB = ((System.Windows.Controls.TextBlock)(target)); return; case 25: this.Category3AmountTextB = ((System.Windows.Controls.TextBlock)(target)); return; case 26: this.Category4AmountTextB = ((System.Windows.Controls.TextBlock)(target)); return; case 27: this.BackgroundRectangleHeader = ((System.Windows.Shapes.Rectangle)(target)); return; case 28: this.BackgroundRectangleListBox = ((System.Windows.Shapes.Rectangle)(target)); return; case 29: this.NameLabel = ((System.Windows.Controls.Label)(target)); return; case 30: this.RemoveLabel = ((System.Windows.Controls.TextBox)(target)); return; case 31: this.Cat1ListBox = ((Microsoft.Surface.Presentation.Controls.SurfaceListBox)(target)); return; case 32: this.removeitem = ((Microsoft.Surface.Presentation.Controls.SurfaceListBoxItem)(target)); return; case 33: this.Stackmodel = ((System.Windows.Controls.Canvas)(target)); return; case 34: this.removeitem2 = ((Microsoft.Surface.Presentation.Controls.SurfaceListBoxItem)(target)); return; case 35: this.removeitem3 = ((Microsoft.Surface.Presentation.Controls.SurfaceListBoxItem)(target)); return; case 36: this.removeitem4 = ((Microsoft.Surface.Presentation.Controls.SurfaceListBoxItem)(target)); return; case 37: this.removeitem5 = ((Microsoft.Surface.Presentation.Controls.SurfaceListBoxItem)(target)); return; case 38: this.removeitem6 = ((Microsoft.Surface.Presentation.Controls.SurfaceListBoxItem)(target)); return; case 39: this.Border = ((System.Windows.Shapes.Path)(target)); return; case 40: this.BorderPoint0 = ((System.Windows.Media.PathFigure)(target)); return; case 41: this.BorderPoint1 = ((System.Windows.Media.LineSegment)(target)); return; case 42: this.BorderPoint2 = ((System.Windows.Media.LineSegment)(target)); return; case 43: this.BorderPoint3 = ((System.Windows.Media.LineSegment)(target)); return; case 44: this.ApproveGrid = ((System.Windows.Controls.Grid)(target)); return; case 45: this.OkText = ((System.Windows.Controls.TextBox)(target)); return; case 46: this.CancelText = ((System.Windows.Controls.TextBox)(target)); return; case 47: this.OkRectangle = ((System.Windows.Shapes.Rectangle)(target)); return; case 48: this.OkButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); return; case 49: this.PausePlayImage = ((System.Windows.Controls.Image)(target)); return; case 50: this.CancelRectangle = ((System.Windows.Shapes.Rectangle)(target)); return; case 51: this.CancelButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); return; } this._contentLoaded = true; }
public static WMedia.Geometry ToWindows(this Geometry geometry) { WMedia.Geometry wGeometry = null; if (geometry is LineGeometry) { LineGeometry lineGeometry = geometry as LineGeometry; wGeometry = new WMedia.LineGeometry { StartPoint = lineGeometry.StartPoint.ToWindows(), EndPoint = lineGeometry.EndPoint.ToWindows() }; } else if (geometry is RectangleGeometry) { var rect = (geometry as RectangleGeometry).Rect; wGeometry = new WMedia.RectangleGeometry { Rect = new WFoundation.Rect(rect.X, rect.Y, rect.Width, rect.Height) }; } else if (geometry is EllipseGeometry) { EllipseGeometry ellipseGeometry = geometry as EllipseGeometry; wGeometry = new WMedia.EllipseGeometry { Center = ellipseGeometry.Center.ToWindows(), RadiusX = ellipseGeometry.RadiusX, RadiusY = ellipseGeometry.RadiusY }; } else if (geometry is GeometryGroup) { GeometryGroup geometryGroup = geometry as GeometryGroup; wGeometry = new WMedia.GeometryGroup { FillRule = ConvertFillRule(geometryGroup.FillRule) }; foreach (Geometry children in geometryGroup.Children) { WMedia.Geometry winChild = children.ToWindows(); (wGeometry as WMedia.GeometryGroup).Children.Add(winChild); } } else if (geometry is PathGeometry) { PathGeometry pathGeometry = geometry as PathGeometry; WMedia.PathGeometry wPathGeometry = new WMedia.PathGeometry { FillRule = ConvertFillRule(pathGeometry.FillRule) }; foreach (PathFigure xamPathFigure in pathGeometry.Figures) { WMedia.PathFigure wPathFigure = new WMedia.PathFigure { StartPoint = xamPathFigure.StartPoint.ToWindows(), IsFilled = xamPathFigure.IsFilled, IsClosed = xamPathFigure.IsClosed }; wPathGeometry.Figures.Add(wPathFigure); foreach (PathSegment pathSegment in xamPathFigure.Segments) { // LineSegment if (pathSegment is LineSegment) { LineSegment lineSegment = pathSegment as LineSegment; WMedia.LineSegment winSegment = new WMedia.LineSegment { Point = lineSegment.Point.ToWindows() }; wPathFigure.Segments.Add(winSegment); } // PolylineSegment if (pathSegment is PolyLineSegment) { PolyLineSegment polyLineSegment = pathSegment as PolyLineSegment; WMedia.PolyLineSegment wSegment = new WMedia.PolyLineSegment(); foreach (var point in polyLineSegment.Points) { wSegment.Points.Add(point.ToWindows()); } wPathFigure.Segments.Add(wSegment); } // BezierSegment if (pathSegment is BezierSegment) { BezierSegment bezierSegment = pathSegment as BezierSegment; WMedia.BezierSegment wSegment = new WMedia.BezierSegment { Point1 = bezierSegment.Point1.ToWindows(), Point2 = bezierSegment.Point2.ToWindows(), Point3 = bezierSegment.Point3.ToWindows() }; wPathFigure.Segments.Add(wSegment); } // PolyBezierSegment else if (pathSegment is PolyBezierSegment) { PolyBezierSegment polyBezierSegment = pathSegment as PolyBezierSegment; WMedia.PolyBezierSegment wSegment = new WMedia.PolyBezierSegment(); foreach (var point in polyBezierSegment.Points) { wSegment.Points.Add(point.ToWindows()); } wPathFigure.Segments.Add(wSegment); } // QuadraticBezierSegment if (pathSegment is QuadraticBezierSegment) { QuadraticBezierSegment quadraticBezierSegment = pathSegment as QuadraticBezierSegment; WMedia.QuadraticBezierSegment wSegment = new WMedia.QuadraticBezierSegment { Point1 = quadraticBezierSegment.Point1.ToWindows(), Point2 = quadraticBezierSegment.Point2.ToWindows() }; wPathFigure.Segments.Add(wSegment); } // PolyQuadraticBezierSegment else if (pathSegment is PolyQuadraticBezierSegment) { PolyQuadraticBezierSegment polyQuadraticBezierSegment = pathSegment as PolyQuadraticBezierSegment; WMedia.PolyQuadraticBezierSegment wSegment = new WMedia.PolyQuadraticBezierSegment(); foreach (var point in polyQuadraticBezierSegment.Points) { wSegment.Points.Add(point.ToWindows()); } wPathFigure.Segments.Add(wSegment); } // ArcSegment else if (pathSegment is ArcSegment) { ArcSegment arcSegment = pathSegment as ArcSegment; WMedia.ArcSegment wSegment = new WMedia.ArcSegment { Size = new WFoundation.Size(arcSegment.Size.Width, arcSegment.Size.Height), RotationAngle = arcSegment.RotationAngle, IsLargeArc = arcSegment.IsLargeArc, SweepDirection = arcSegment.SweepDirection == SweepDirection.Clockwise ? WMedia.SweepDirection.Clockwise : WMedia.SweepDirection.Counterclockwise, Point = arcSegment.Point.ToWindows() }; wPathFigure.Segments.Add(wSegment); } } } wGeometry = wPathGeometry; } return(wGeometry); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.UserControl = ((Prototype_05.ModelOverviewControl)(target)); #line 11 "..\..\..\ModelOverviewControl.xaml" this.UserControl.Loaded += new System.Windows.RoutedEventHandler(this.ContentLoaded); #line default #line hidden return; case 2: this.MainGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.AddOrRemoveGrid = ((System.Windows.Controls.Grid)(target)); return; case 4: this.ConfirmRemoveRectangle = ((System.Windows.Shapes.Rectangle)(target)); return; case 5: this.ConfirmAddRectangle = ((System.Windows.Shapes.Rectangle)(target)); return; case 6: this.ConfirmButton = ((Microsoft.Surface.Presentation.Controls.SurfaceButton)(target)); #line 39 "..\..\..\ModelOverviewControl.xaml" this.ConfirmButton.PreviewTouchDown += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.OptionTouchDown); #line default #line hidden #line 39 "..\..\..\ModelOverviewControl.xaml" this.ConfirmButton.PreviewTouchMove += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.OptionTouchMove); #line default #line hidden #line 39 "..\..\..\ModelOverviewControl.xaml" this.ConfirmButton.PreviewTouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.OptionTouchUp); #line default #line hidden return; case 7: this.PlusMinusImage = ((System.Windows.Controls.Image)(target)); return; case 8: this.RemovingText = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.AddingText = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.CategoryGrid = ((System.Windows.Controls.Grid)(target)); #line 50 "..\..\..\ModelOverviewControl.xaml" this.CategoryGrid.PreviewTouchDown += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.CategoryTouchDown); #line default #line hidden #line 50 "..\..\..\ModelOverviewControl.xaml" this.CategoryGrid.PreviewTouchMove += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.CategoryTouchMove); #line default #line hidden #line 50 "..\..\..\ModelOverviewControl.xaml" this.CategoryGrid.PreviewTouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.CategoryTouchUp); #line default #line hidden return; case 11: this.Category0Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 12: this.Category1Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 13: this.Category2Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 14: this.Category3Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 15: this.Category4Rect = ((System.Windows.Shapes.Rectangle)(target)); return; case 16: this.Category0Image = ((System.Windows.Controls.Image)(target)); return; case 17: this.Category1Image = ((System.Windows.Controls.Image)(target)); return; case 18: this.Category2Image = ((System.Windows.Controls.Image)(target)); return; case 19: this.Category3Image = ((System.Windows.Controls.Image)(target)); return; case 20: this.Category4Image = ((System.Windows.Controls.Image)(target)); return; case 21: this.Category0Text = ((System.Windows.Controls.TextBox)(target)); return; case 22: this.Category1Text = ((System.Windows.Controls.TextBox)(target)); return; case 23: this.Category2Text = ((System.Windows.Controls.TextBox)(target)); return; case 24: this.Category3Text = ((System.Windows.Controls.TextBox)(target)); return; case 25: this.Category4Text = ((System.Windows.Controls.TextBox)(target)); return; case 26: this.Category0AmountText = ((System.Windows.Controls.TextBox)(target)); return; case 27: this.Category1AmountText = ((System.Windows.Controls.TextBox)(target)); return; case 28: this.Category2AmountText = ((System.Windows.Controls.TextBox)(target)); return; case 29: this.Category3AmountText = ((System.Windows.Controls.TextBox)(target)); return; case 30: this.Category4AmountText = ((System.Windows.Controls.TextBox)(target)); return; case 31: this.BackgroundRectangleHeader = ((System.Windows.Shapes.Rectangle)(target)); return; case 32: this.BackgroundRectangleListBox = ((System.Windows.Shapes.Rectangle)(target)); return; case 33: this.NameLabel = ((System.Windows.Controls.Label)(target)); return; case 34: this.IDLabel = ((System.Windows.Controls.Label)(target)); return; case 35: this.Cat0ListBox = ((Microsoft.Surface.Presentation.Controls.SurfaceListBox)(target)); #line 148 "..\..\..\ModelOverviewControl.xaml" this.Cat0ListBox.Loaded += new System.Windows.RoutedEventHandler(this.WasLoaded); #line default #line hidden #line 148 "..\..\..\ModelOverviewControl.xaml" this.Cat0ListBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ModelSelectionChanged); #line default #line hidden return; case 36: this.Cat1ListBox = ((Microsoft.Surface.Presentation.Controls.SurfaceListBox)(target)); #line 157 "..\..\..\ModelOverviewControl.xaml" this.Cat1ListBox.Loaded += new System.Windows.RoutedEventHandler(this.WasLoaded); #line default #line hidden #line 157 "..\..\..\ModelOverviewControl.xaml" this.Cat1ListBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ModelSelectionChanged); #line default #line hidden return; case 37: this.Cat2ListBox = ((Microsoft.Surface.Presentation.Controls.SurfaceListBox)(target)); #line 176 "..\..\..\ModelOverviewControl.xaml" this.Cat2ListBox.Loaded += new System.Windows.RoutedEventHandler(this.WasLoaded); #line default #line hidden #line 176 "..\..\..\ModelOverviewControl.xaml" this.Cat2ListBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ModelSelectionChanged); #line default #line hidden return; case 38: this.Cat3ListBox = ((Microsoft.Surface.Presentation.Controls.SurfaceListBox)(target)); #line 185 "..\..\..\ModelOverviewControl.xaml" this.Cat3ListBox.Loaded += new System.Windows.RoutedEventHandler(this.WasLoaded); #line default #line hidden #line 185 "..\..\..\ModelOverviewControl.xaml" this.Cat3ListBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ModelSelectionChanged); #line default #line hidden return; case 39: this.Cat4ListBox = ((Microsoft.Surface.Presentation.Controls.SurfaceListBox)(target)); #line 194 "..\..\..\ModelOverviewControl.xaml" this.Cat4ListBox.Loaded += new System.Windows.RoutedEventHandler(this.WasLoaded); #line default #line hidden #line 194 "..\..\..\ModelOverviewControl.xaml" this.Cat4ListBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ModelSelectionChanged); #line default #line hidden return; case 40: this.Border = ((System.Windows.Shapes.Path)(target)); return; case 41: this.BorderPoint0 = ((System.Windows.Media.PathFigure)(target)); return; case 42: this.BorderPoint1 = ((System.Windows.Media.LineSegment)(target)); return; case 43: this.BorderPoint2 = ((System.Windows.Media.LineSegment)(target)); return; case 44: this.BorderPoint3 = ((System.Windows.Media.LineSegment)(target)); return; } this._contentLoaded = true; }