Esempio n. 1
0
        public void AlignByKey()
        {
            var viewModel = new AlignmentViewModel(this, CreateAlignment());
            var bounds    = new LocationCalculator().CalculateBounds(Handle, KeyGrabOffset);

            using (var grabber = UIManager.GetKeyGrabber(viewModel))
            {
                grabber.SetBounds(bounds);
                grabber.Display();
            }
        }
Esempio n. 2
0
 public IKeyGrabber GetKeyGrabber(AlignmentViewModel viewModel)
 {
     return(new FormKeyGrabber {
         ViewModel = viewModel
     });
 }