private void cmb_allc_SelectionChanged(object sender, SelectionChangedEventArgs e) { JWCControl ctrl = cmb_allc.SelectedItem as JWCControl; if (ctrl == null) { return; } if (ctrl == stage.SelectedControl) { return; } ctrl.GetFocus(); }
public void PasteSelecting() { if (_ClipBoard == null) { return; } JWCControl jc = (JWCControl)Activator.CreateInstance(_ClipBoard.GetType()); jc.InputProperty(_ClipBoard.OutputProperty()); jc.IsEditMode = true; double left = jc.Margin.Left + 20; double top = jc.Margin.Top + 20; Thickness th = new Thickness((int)left, (int)top, 0, 0); jc.Margin = th; AddControl(jc); jc.GetFocus(); }