I've got a simple docking/MDI application where each tab shows an image. When I tried wrapping each image in a ZoomContentControl, it yielded the error:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='ActiproSoftware.Windows.Controls.Navigation.ZoomDecorator', AncestorLevel='1''. BindingExpression:Path=ZoomLevelAnimated; DataItem=null; target element is 'ScaleTransform' (HashCode=3499754); target property is 'ScaleX' (type 'Double')
However, functionality of the zoom control works as expected. What might be causing this message to appear?
Some code:
<Window.Resources>
<Style x:Key="DocumentItemStyle" TargetType="docking:DocumentWindow">
<Setter Property="Title" Value="{Binding Title}" />
<Setter Property="FileName" Value="{Binding Filename}" />
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<navigation:ZoomContentControl IsPanPadVisible="False" IsResetViewButtonVisible="False">
<shared:ActiproLogo />
</navigation:ZoomContentControl>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<docking:DockSite
sampleCommon:DockSiteViewModelBehavior.IsManaged="true"
DocumentItemsSource="{Binding DocumentItems}"
DocumentItemContainerStyle="{StaticResource DocumentItemStyle}" >
<docking:Workspace>
<docking:TabbedMdiHost />
</docking:Workspace>
</docking:DockSite>