コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="viewModel"></param>
        /// <param name="hInfo"></param>
        public SurveyPopupWindow(SurveyPopupViewModel viewModel, HostControlInfo hInfo)
        {
            InitializeComponent();
            if (viewModel != null)
            {
                surveyViewModel = viewModel;
            }

            DataContext = surveyViewModel;

            //Setting the host over which the popup will appear and the placement mode
            PlacementTarget = hInfo.HostUIElement;
            Placement       = hInfo.PopupPlacement;

            //When setting a value for offset it will move the popup taking as a initial position the host control position in which the popup is shown
            HorizontalOffset = hInfo.HorizontalPopupOffSet;
            VerticalOffset   = hInfo.VerticalPopupOffSet;
        }
コード例 #2
0
ファイル: Survey.cs プロジェクト: reddyashish/Dynamo
        protected override void CreatePopup()
        {
            var surveyPopupViewModel = new SurveyPopupViewModel(this);

            stepUIPopup = new SurveyPopupWindow(surveyPopupViewModel, HostPopupInfo);
        }