public override void AttachUI(ToolInitInfo previewInitInfo) { this.currnetEditor = previewInitInfo.ImageEditor; this.previewPanel = previewInitInfo.PreviewPanel; this.currnetEditor.ScaleFactorChanged += currnetEditor_ScaleFactorChanged; this.previewPanel.SizeChanged += currnetEditor_ScaleFactorChanged; this.previewPanel.Children.Add(this.watermarkImage); this.UpdateScaleFactor(); }