Hy guys, can You help me on this?
I'm using Silverlight 4 and VS 2010.
I've created a very simple UserControl named "Marquee".
<usercontrol>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Name="userControl"
mc:Ignorable="d"
xmlns:util="clr-namespace:CanvasClip"
x:Class="Marquee.Marquee"
d:DesignWidth="1125" d:DesignHeight="30">
<grid x:name="LayoutRoot" xmlns:x="#unknown">
<canvas x:name="MarqueeContainer" margin="0" util:clip.tobounds="true" xmlns:util="#unknown">
<stackpanel x:name="MarqueeContent" d:layoutoverrides="VerticalMargin" orientation="Horizontal" canvas.left="0" height="30" loaded="MarqueeContent_Loaded" xmlns:d="#unknown" />
</canvas>
</grid>
</usercontrol>
In my MainPage I've inserted the user control "Marquee1" and set it's background property.
<grid x:name="LayoutRoot" xmlns:x="#unknown">
<mrq:marquee x:name="Marquee1" height="30" verticalalignment="Top" margin="148,0,413,0" removed="#FFC8DC1A" xmlns:mrq="#unknown" />
<Button Content="Button" Height="30" HorizontalAlignment="Left" Margin="393,134,0,0" x:Name="button1" VerticalAlignment="Top" Width="219" Click="button1_Click" />
</grid>
(Somehow I can't paste the code as it was on VS. Where it say "removed" it should be "background" on the mrq:Maquee element and the xmlns:mrq="#unknown" additions are strange to me.)
What I need is to bind the canvas "MarqueeContainer" background in the usercontrol "Marquee" to the "Marquee1" background property set on the MainPage.
In the usercontrol XAML It has to be something like:
Background="{Binding ???????}
But I'm kind of lost!