using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace WpfApp04
{
/// <summary>
/// TestWin08.xaml 的交互逻辑
/// </summary>
public partial class TestWin08 : Window
{
public TestWin08()
{
InitializeComponent();
}
double opacity= 1.0;
private void CloneVisual(object sender, RoutedEventArgs e)
{
VisualBrush brush = new VisualBrush(this.realButton);
Rectangle rect = new Rectangle();
rect.Width = realButton.ActualWidth;
rect.Height = realButton.ActualHeight;
rect.Fill = brush;
rect.Opacity = opacity;
opacity -= 0.2;
this.spRight.Children.Add(rect);
}
}
}