コード例 #1
0
        private void SetColorResplandor()
        {
            if (Imagen == null)
            {
                return;
            }
            Bitmap bitmapT = HerramientasWindow.ImageSourceABitmap(Imagen);

            System.Drawing.Color pixelColor = bitmapT.GetPixel(bitmapT.Height / 2, bitmapT.Width / 2);

            img_imagen_Resplandor.Effect =
                new DropShadowEffect
            {
                Color = new System.Windows.Media.Color()
                {
                    A = pixelColor.A, R = pixelColor.R, G = pixelColor.G, B = pixelColor.B
                },
                Direction     = 315,
                ShadowDepth   = 0,
                Opacity       = 100,
                BlurRadius    = 10,
                RenderingBias = RenderingBias.Performance
            };
        }