void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.forms = ((AvalonEdit.Editor.FindForm)(target)); return; } this._contentLoaded = true; }
private void Button_Click(object sender, RoutedEventArgs e) { double w = this.ActualWidth; double h = this.ActualHeight; double wf = 300; double hf = 69; ff = new FindForm(); ff.Width = wf; ff.Height = hf; Popup popup = new Popup(); popup.Child = ff; popup.Placement = PlacementMode.Relative; popup.HorizontalOffset = w - wf - 15 - 2; popup.VerticalOffset = 20; popup.PlacementTarget = treeListView; popup.IsOpen = true; }