Conrad Szyman

Conrad Szyman

  • NA
  • 29
  • 1.4k

making a line to mouse when pressing a button

Oct 15 2022 2:32 PM
    public partial class connector : UserControl
    {
        public bool isConnected;
        public int ID;
        public int connectedToID;
        public connector()
        {
            InitializeComponent();
        }

        private void button_Click(object sender, RoutedEventArgs e)
        {
            
        }
    }

i have this usercontrol, how would i make it so that when it is clicked on my canvas, a line is drawn from the position of the connector to the mouse, would i have to do this in my mainwindow class


Answers (1)