Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
115
The property 'Content' is set more than once
posted

I am trying to put more than one control inside TilePane. Everytime I put more than one, I get this error 'The property Content is set more than once'. Any ideas? Thanks.

-Frank

  • 12631
    Verified Answer
    posted

    The Content property exposes the control template which can only accept on child element.  This is true for any Content Control in Silverlight.  To get around this, make your root element a layout panel (like a Grid or a StackPanel) that accepts more than one child element.  So in XAML, it would look like:

    <TilePane>
        <StackPanel>
            <Button />
            <Button />
            <Button />
        </StackPanel>
    </TilePane>

    Devin