Example #1
0
        public void SetTextWrapping(bool wrap)
        {
            if (!this.Client.HasSelectedShapes())
            {
                return;
            }

            var selection   = this.Client.Selection.Get();
            var shapeids    = selection.GetIDs();
            var application = this.Client.VisioApplication;

            using (var undoscope = new VA.Application.UndoScope(application, "SetTextWrapping"))
            {
                var active_page = application.ActivePage;
                TextCommandsUtil.set_text_wrapping(active_page, shapeids, wrap);
            }
        }
        public void SetTextWrapping(IList <IVisio.Shape> target_shapes, bool wrap)
        {
            this.Client.Application.AssertApplicationAvailable();
            this.Client.Document.AssertDocumentAvailable();

            var shapes = this.GetTargetShapes2D(target_shapes);

            if (shapes.Count < 1)
            {
                return;
            }

            var shapeids    = shapes.Select(s => s.ID).ToList();
            var application = this.Client.Application.Get();

            using (var undoscope = this.Client.Application.NewUndoScope("SetTextWrapping"))
            {
                var active_page = application.ActivePage;
                TextCommandsUtil.set_text_wrapping(active_page, shapeids, wrap);
            }
        }