public WinTextIntellisenseSearch(String position, TextBox source, Window win, TextSearchNameSpace ns, MasterRefEnum mrt, Boolean showDetail, UTextBoxSearch caller, MVBase extParam)
        {
            int offset = 10;

            parentCaller = caller;
            nameSpace    = ns;
            mrType       = mrt;
            isShowDetail = showDetail;
            extraParam   = extParam;

            //https://social.msdn.microsoft.com/Forums/vstudio/en-US/281a8cdd-69a9-4a4a-9fc3-c039119af8ed/absolute-screen-coordinates-of-wpf-user-control?forum=wpf
            Point locationFromScreen = source.PointToScreen(new Point(0, 0));
            PresentationSource s     = PresentationSource.FromVisual(win);
            Point targetPoints       = s.CompositionTarget.TransformFromDevice.Transform(locationFromScreen);

            if (position.Equals("R"))
            {
                tp = targetPoints.Y;
                lf = targetPoints.X + source.ActualWidth + offset;
            }
            else if (position.Equals("B"))
            {
                tp = targetPoints.Y + source.ActualHeight + offset;
                lf = targetPoints.X;
            }

            InitializeComponent();
        }
예제 #2
0
 private void cmdAction_Click(object sender, RoutedEventArgs e)
 {
     currentObj = (MVBase)(sender as UActionButton).Tag;
 }
예제 #3
0
 public override void DoubleClickData(MVBase m)
 {
     currentObj = m;
     showEditWindow();
 }