title: What are the Silverlight 3 alternatives to DynamicResource and Element-based Brushes?
body: <p>I need to have a custom UI element that can be changed, such as the colour and text used in the application but as a resource - in WPF I can use a DynamicResource to assign brushes, strings etc, however I need to implement this in Silverlight 3 - how can I do this as a StaticResource will not do, and as another question I have a resource which is made of other UI-Elements like Rectangles. See example from my existing ResourceDictionary:  </p>
  
  <pre><code>    &lt;VisualBrush x:Key="Device" Stretch="Uniform"&gt;
      &lt;VisualBrush.Visual&gt;
          &lt;Canvas Width="20" Height="36"&gt;
              &lt;Rectangle Height="36" Width="20" Fill="{DynamicResource ZuneColour}" Canvas.Left="0" Canvas.Top="0" RadiusX="1" RadiusY="1"&gt;
                  &lt;Rectangle.BitmapEffect&gt;
                      &lt;OuterGlowBitmapEffect GlowColor="Black" GlowSize="2" /&gt;
                  &lt;/Rectangle.BitmapEffect&gt;
              &lt;/Rectangle&gt;
              &lt;Rectangle Fill="{DynamicResource ZuneScreen}" Canvas.Left="1" Canvas.Top="1" Height="24" Stroke="#191616" Width="18"/&gt;
              &lt;Rectangle Canvas.Left="5.5" Canvas.Top="25" Height="9" Width="9" RadiusX="3" RadiusY="3" Fill="{DynamicResource ZunePad}" Stroke="{DynamicResource ZunePadOuter}"/&gt;
          &lt;/Canvas&gt;
      &lt;/VisualBrush.Visual&gt;
  &lt;/VisualBrush&gt;
  </code></pre>
  
  <p>I have also had an issue with replicating the OuterGlowEffect, but at least this can be done with a compiled DirectX effect so can leave this out if needed.</p>
  
  <hr>
  
  <p>I think Data Bindings will be a good solution to dynamic content as can create a Class which
  stores the visual data I need and this can be a One-way binding to update the UI - hopefully this may be useful to others with the same issue.<br>
  Still need to replace VisualBrush functionality with something that will work in Silverlight for the given example.</p>