Ejemplo n.º 1
0
        private static Image GetImage(int width, int height, ImageSource imageSource)
        {
            var image = new Image {
                Source = imageSource, Width = width, Height = height
            };

            FWElementHelper.FakeLayout(image);
            return(image);
        }
Ejemplo n.º 2
0
        public FrameworkElement Plot(params Point[][] pointArrays)
        {
            Contract.Requires(pointArrays != null);
            Contract.Ensures(Contract.Result <FrameworkElement>() != null);

            double xMin, xMax, yMin, yMax;

            ExtractRange(pointArrays.Flatten(), xRange, p => p.X, out xMin, out xMax);
            ExtractRange(pointArrays.Flatten(), yRange, p => p.Y, out yMin, out yMax);

            var canvas = Plot(pointArrays, xMin, xMax, yMin, yMax);

            FWElementHelper.FakeLayout(canvas);

            return(canvas);
        }