Fam Wired 7 years ago updated by Hypo Dyne 5 years ago 4

It's easy to reproduce this, just add two tabitems with different helixviewports.

xaml code:

        <TabControl>            <TabItem Header="Tab1">
                    <h:BoxVisual3D x:Name="box1" Center="-3.5,0,1" Height="3" Fill="Silver"/>
                    <h:TranslateManipulator Color="Blue" Position="-3.5,0,1" Offset="0,0,1.5" Length="1" Value="{Binding Height, ElementName=box1, Converter={StaticResource Multiplier}}" Direction="0,0,1"/>
            <TabItem Header="Tab2">
                    <h:BoxVisual3D x:Name="box2" Center="-3.5,0,1" Height="3" Fill="Silver"/>
                    <h:TranslateManipulator Color="Red" Position="-3.5,0,1" Offset="0,0,1.5" Length="1" Value="{Binding Height, ElementName=box2, Converter={StaticResource Multiplier}}" Direction="0,0,1"/>

It works perfect in the first tabitem, but in the second tabItem I got binding error:

Cannot find source for binding with reference 'ElementName=box1'. BindingExpression:Path=Height; DataItem=null; target element is 'TranslateManipulator' (HashCode=28505784); target property is 'Value' (type 'Double')

Does anyone have a workaround or solution for this issue??


F Wired

Correction: Binding error: box2 instead of box1 in the specific case above.

I think its to do with the Tab Control. See if it works outside of the tab control.