contentcontrol

References to Controls in ContentControl are null at the Parent (Page) Level

As a follow up to this question where it was suggested I use a ContentControl, I have run into a scenario when I use a custom made class that dervies from ContentControl on a page, any controls defined within that ContentControl are not accessible from the page. All member variables turn out null. For Instance, say the custom class I cr...

Target header and footer Content Controls in Word 2007

I'm trying to edit a .docx header through Word Automation. If the Content Controls are placed in the body of the text there is no problem, but if the content controls are in the header or footer I'm not able to target them. Is there any way of targetting Content Controls in the header or footer (using Visual Studio 2008 Express)? ...

OpenXML: Creating reusable Content Controls with binding

I need to attach specific XML to a word document so the elements will show up in the right places. This I can do with OpenXML SDK. The thing is I want too be able to define the Content Controls already bounded in some sort of template so other people can create the real document template the xml will be attached to. Ok not sure people w...

Help me improve a OpenXML linq-to-xml query!

Guess people need some experience with Linq-to-xml and knowledge of the build of a openXML word document. I have this Linq to XML query that's supposed to find Content Controls. It works most of the time but I think it's still just juryrigged and not proper. How it works, if I understand correctly, is that it checks StdRuns and finds i...

Replacing Content Controls in OpenXML

I need something as a placeholder. I at first looked to Content Control as a solution but I'm having some problems with it. I at first looked into adding CustomXML to the .docx but turned away from that because of the i4i lawsuit. Then I decided I would just plain change the text of the Content Control through OpenXML SDK 2.0 but even ...

Why would I want IsTabStop set to true on a ContentControl?

Given the following: setting IsTabStop to false on a ContentControl will not prevent its content from acting as a tab-stop setting IsTabStop to true will result in an invisible tab-stop, which does nothing, in your application I have the following two questions: Why is IsTabStop true by default for the ContentControl Why would I ev...

Export the content of content control into another word document

Hi, I have a word document with many content controls. How can I export the content of content control into another word document? I'm using C# and open xml sdk. Regards. ...

Content control contents sizing to fill in Silverlight 4

I have a style for a ContentControl which I want to use in places where I currently have a Border. When I use this, the child controls will not stretch to fill and only take a small amount of space. I've tried applying HorizontalAlignment="Stretch" to everything, but it doesn't work. What's wrong? <Style x:Key="GradientPanel" TargetType...

XAML tostring in ContentControl

I am new to the XAML world and I'm fumbling my way through a lot of tutorials. One thing i'm stuck on is calling the .tostring on an object. Here is mysetup I have a listbox that is bound to a list of objects I have a contentControl bound to the same list that displays the selected item from the listbox. My ContentControl is as follow...

Word interop- ParentContentControl is null for content control contained within a simple text box

Hi, I am using word interop to edit docx files. In word doument I can have multiple nested content controls, in some cases I have a content control 'A' containing a text box (simple text box inserted from Insert-Text box-simple text box) the text box contains in turn a content control 'B'. When entering the nested content control 'B', ...

can I define my own panel control with asp.net usercontrols

I want something like that: <my:MyFancyPanel> <asp:Label Text="Hello"> </my:MyFancyPanel> I tried but it seems my usercontrol doesn't accept any content. ...

Binding to property on root element in DataTemplate through a ContentControl

In my user interface I sometimes want to put titles above usercontrols. I want to declare these titles in XAML for future localizability, so I want to keep them out of the datacontexts. Can databinding fetch them from a property set on the root node of the usercontrol? I have boiled the problem down to the following code example: usi...

I cannot seem to find a way to access the content inside the ContentPresenter to be able to update the parent(s)

Hi, I am making a collapsible ContentControl. Everything works fine until I try to embed a collapsible ContentControl as content inside the ContentPresenter of the same type collapsible control. The collapsing and expanding is done using animations. But when the content of the collapsible control changes in size it will not update its pa...

Silverlight 4 custom control binding order is different when inside ContentControl.

I have a custom container control that has a number of dependency properties. One of which requires element binding. Most of the controls logic is within the OnApplyTemplate() method. When I test my control inside a normal panel or ItemsControl, everything works fine. However if the control is placed inside a ContentControl (which it...

WP7 Popups using resources

Im trying to create my own(custom design) popup for my WP7 application. To put it shortly it should only display bing map with a drawn route and a close button. I have used the Picker Box by from Alex Yakhnin's Blog. And by his code as a reference i have made my custom xaml file with the following (only basic design, maps and button le...

Problems loading images in a Silverlight ControlTemplate

I have problems accessing images in the ControlTemplate of a "Silverlight Templated Control" I implemented. The Style for my control called "ControlDragger" is the following: <!-- ControlDragger Menu button style --> <Style x:Key="MenuButtonStyle" TargetType="Button"> <Setter Property="Margin" Value="5,0" /> <Setter Property="Te...