private void Button_Click(object sender, RoutedEventArgs e) { Random random = new Random(); float size = random.Next(50, 150); float offsetX = random.Next(0, (int)(CompositionHostControl1.ActualWidth - size)); float offsetY = random.Next(0, (int)(CompositionHostControl1.ActualHeight / 2 - size)); CompositionHostControl1.AddElement(size, offsetX, offsetY); }
private void Button_Click(object sender, RoutedEventArgs e) { CompositionHostControl1.ToggleAcrylic(); }