How i can after i create a duplicate move back the selection to the orig shape.So that this Original image always is selected?
In my case is it so:
i select a picture and create a duplicate on the right side. But after this is the duplicate selected. I would like that is only the origin Image is selected
1 2 3 4 5 6 7 8 9 10
private void Button_Click(object sender, RoutedEventArgs e) { corelApp.ActiveDocument.Unit = corelApp.ActiveDocument.Rulers.HUnits; corelApp.ActiveSelection.Shapes.All().CreateSelection(); xSize = corelApp.ActiveSelection.SizeWidth; origImg = corelApp.ActiveSelectionRange.FirstShape; origImg.Duplicate(); corelApp.ActiveSelection.Move(xSize+3, 0); //ConvertImage(); }
use something like:
corelApp.ActiveDocument.ClearSelection
origImg.AddToSelection
Many thanks. Now i can clear the selection, but if i use origImg.AddToSelection , it is the duplicate selected
1 2 3 4 5 6 7 8 9 10 11 12 13
private void Button_Click(object sender, RoutedEventArgs e) { corelApp.ActiveDocument.Unit = corelApp.ActiveDocument.Rulers.HUnits; corelApp.ActiveSelection.Shapes.All().CreateSelection(); xSize = corelApp.ActiveSelection.SizeWidth; origImg = corelApp.ActiveSelectionRange.FirstShape; origImg.Duplicate(); corelApp.ActiveSelection.Move(xSize+3, 0); //ConvertImage(); corelApp.ActiveDocument.ClearSelection(); origImg.AddToSelection(); //corelApp.ActiveWindow.ActiveView.ToFitSelection(); }