ContentControl - only allow formatting?

C

Colbert Zhou [MSFT]

Hello Dave,

1). We can only disable editing the content control by setting its
LockContents property to true
http://msdn.microsoft.com/en-us/library/bb242779.aspx
But in this case, we cannot format,

2). No event raised when a specified content control's text changes. But we
have a event of document, named ContentControlBeforeContentUpdate. It
occurs before updating the content in a content control. But it only occurs
when the content comes from the Office XML data store. (Does this work for
your scenario?)
http://msdn.microsoft.com/en-us/library/bb256755.aspx


Best regards,
Colbert Zhou
Microsoft Online Community Support
 
D

David Thielen

Why do you keep telling me no :)

1) Yep, thats the problem - we must let them change the formatting.

2) Unfortunately we need to know when the user changes the text in the
control - so we can update our copy.

I think I can do this when we open the tag - PITA though.

thanks - dave


Hello Dave,

1). We can only disable editing the content control by setting its
LockContents property to true
http://msdn.microsoft.com/en-us/library/bb242779.aspx
But in this case, we cannot format,

2). No event raised when a specified content control's text changes. But we
have a event of document, named ContentControlBeforeContentUpdate. It
occurs before updating the content in a content control. But it only occurs
when the content comes from the Office XML data store. (Does this work for
your scenario?)
http://msdn.microsoft.com/en-us/library/bb256755.aspx


Best regards,
Colbert Zhou
Microsoft Online Community Support


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Colbert Zhou [MSFT]

I wish I could say Yes and provide help, give a perfect solution on this.
But as the Product is designed this way, I think maybe an acceptable
workaround can be good for us. :)

What about providing an addin button to let customers set font size and
color separately? I mean, we can set the LockContents property to
true(disable editing), but provide a button in the Ribbon. It's purpose is,
when clicked, the end user can see a dialog where he can choose a font
name, size and color. After he chooses the format he wants and clicks the
OK button, we can execute codes there, In our codes, we can set the
LockContent to false and change the format. After that, we lock the content
again. This should be the simplest way I can see to achieve the objective.

Pleae feel free to let me know your thoughts. :)

Have a nice day,

Best regards,
Ji Zhou
Microsoft Online Community Support
 
D

David Thielen

Hi;

The really big problem with not allowing editing is create a paragraph
that has a no-edit CC in the paragraph. Select the entire paragraph.
Then try to do character formatting - you can't. It disables
formatting for any selection that includes the CC.

That makes useability worse. Plus we want the standard formatting
buttons in the ribbon to work to make it easy to use.

We're doing ok reading the contents at the appropiate time - bit of a
pain though.

thanks - dave


I wish I could say Yes and provide help, give a perfect solution on this.
But as the Product is designed this way, I think maybe an acceptable
workaround can be good for us. :)

What about providing an addin button to let customers set font size and
color separately? I mean, we can set the LockContents property to
true(disable editing), but provide a button in the Ribbon. It's purpose is,
when clicked, the end user can see a dialog where he can choose a font
name, size and color. After he chooses the format he wants and clicks the
OK button, we can execute codes there, In our codes, we can set the
LockContent to false and change the format. After that, we lock the content
again. This should be the simplest way I can see to achieve the objective.

Pleae feel free to let me know your thoughts. :)

Have a nice day,

Best regards,
Ji Zhou
Microsoft Online Community Support


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top