Binding w/out Specifying a Path

In C# I have this in the Loaded event handler:

myControl.DataContext = _connInfo;

In the XAML I have this:

<Image Width="1500" Height="1500" Canvas.Left="0" Canvas.Top="0" x:Name="connectionImage" Source="{Binding Path=Type, Converter={StaticResource ConnectionTypeToImageConverter}}" />

And this:

<RotateTransform Angle="{Binding Converter={StaticResource InternetConnectionQualityConverter}}"/>

The first line of XAML gets notified when the Type property changes as expected. The second line of XAML never gets updated beyond the very first time, which is when the app is loaded. However I can't specify a Path for the second line because the converter needs to return a value based on several properties of the root datacontext object. I thought that if you didn't specify the Path it would use the root datacontext but that doesn't appear to be the case once the app has loaded up.

Any ideas


Answer this question

Binding w/out Specifying a Path

  • Slyr133

    I think I might have figured it out on m own...multibinding perhaps I'll let you know!

  • QUT lecturer

    Multibinding was the answer.

  • Binding w/out Specifying a Path