Advertisement
Guest User

Ellipse Clip

a guest
Nov 16th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.30 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Media3D;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16.  
  17. namespace lec_vec
  18. {
  19.     /// <summary>
  20.     /// Логика взаимодействия для MainWindow.xaml
  21.     /// </summary>
  22.     public partial class MainWindow : Window
  23.     {
  24.         public MainWindow()
  25.         {
  26.             InitializeComponent();
  27.             AddEllipse();
  28.         }
  29.         private void AddEllipse()
  30.         {
  31.             Ellipse ell = new Ellipse();
  32.             ell.Stroke = Brushes.Black;
  33.             ell.Fill = Brushes.DarkBlue;
  34.             ell.Height = 300;
  35.             ell.Width = 300;
  36.             ell.Clip = new RectangleGeometry(new Rect(new Point(0, 0), new Size(100, 300)), 0,0);
  37.             canvas1.Children.Add(ell);
  38.         }
  39.         private void textBox_TextChanged(object sender, TextChangedEventArgs e)
  40.         {
  41.  
  42.         }
  43.  
  44.         private void Window_Loaded(object sender, RoutedEventArgs e)
  45.         {
  46.  
  47.         }
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement