csShared.Controls.Popups.InputPopup.InputPopupViewModel.UpdatePosition C# (CSharp) Method

UpdatePosition() private method

private UpdatePosition ( ) : void
return void
    private void UpdatePosition()
    {
      if (view == null) return;
        if (_relativeElement != null)
        {
            Point = RelativeElement.TranslatePoint(RelativePosition, Application.Current.MainWindow);
        }
        else
        {
            Point = RelativePosition;
        }

      view.VerticalAlignment = this.VerticalAlignment;

      switch (view.VerticalAlignment)
      {
        case VerticalAlignment.Top:
          view.bInput.Margin = new Thickness(Point.X, Point.Y, 0, 0);
          break;
        case VerticalAlignment.Bottom:
          view.bInput.Margin = new Thickness(Point.X, 0, 0, Application.Current.MainWindow.ActualHeight - Point.Y);
          //view.Items.Margin = new Thickness(Point.X, Point.Y, 0, 0);
          break;
      }
      
    }