title: Cannot bind Margin property?
body: <p>I am trying to have a sort of animated film strip where only one of its fields is visible at the given moment. Like a film strip in a camera - only one film field is currently placed under the lens and prepared to be enlighted. I try to achieve it as a grid withing an another grid. "Film strip" is called pageContainer in the code below. In the code behind I do an animation which is changing the Margin property of pageContainer grid. Works perfectly, pageContainer is nicely sliding to the left or to the right as I wish. For example: To show the page no. 2 the margin is set to (-270,0,0,0) instead of (0,0,0,0). That moves pageContainer to the left and only the second field is visible instead of the first one.</p>
  
  <p>However as soon as I start resizing the whole UI, this mechanism stops to work and user can see a border between the two pages (fields) instead of only the current one. If I put breakpoint to my pageWidthConverter it is always hit when resizing the whole UI. If I put another breakpoint to pageMarginConverter it is never hit during the resizing. Why? I would like to make the Margin property dependent on BackgroundRectangle ActualWidth similarly as I made it with the Width property. But that does not work. Why is Width dynamically set while resizing the window, but Margin is not???</p>
  
  <p>PS: Instead of using Margin one could use TranslateTransform. I tried but no success either.</p>
  
  <p>If anybody can help it would be so highly appreciated.</p>
  
  <p>Cheers
  Hans</p>
  
  <pre><code>        ... &lt;Grid Grid.Row="3" Grid.Column="1" Margin="0,-4,0,0" ClipToBounds="True"&gt;
                  &lt;Grid x:Name="pageContainer"
                        Width="{Binding Converter={StaticResource pageWidthConvertor}, ElementName=BackgroundRectangle, Path=ActualWidth}"
                        Margin="{Binding Converter={StaticResource pageMarginConvertor}, ElementName=BackgroundRectangle, Path=ActualWidth}" &gt;
  
                      &lt;Grid.ColumnDefinitions&gt;
                          &lt;ColumnDefinition Width="{Binding ElementName=BackgroundRectangle, Path=ActualWidth}"/&gt;
                          &lt;ColumnDefinition Width="40"/&gt;
                          &lt;ColumnDefinition Width="{Binding ElementName=BackgroundRectangle, Path=ActualWidth}"/&gt;
                          &lt;ColumnDefinition Width="40"/&gt;
                          &lt;ColumnDefinition Width="{Binding ElementName=BackgroundRectangle, Path=ActualWidth}"/&gt;
                          &lt;ColumnDefinition Width="40"/&gt;
                          &lt;ColumnDefinition Width="{Binding ElementName=BackgroundRectangle, Path=ActualWidth}"/&gt;
                          &lt;ColumnDefinition Width="40"/&gt;
                      &lt;/Grid.ColumnDefinitions&gt; ...
  </code></pre>