public class MultiBindConverter : IMultiValueConverter{#region IMultiValueConverter Memberspublic object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture){if (values[0] != null){if (values[1] != null){return new Uri(values[1].ToString(), UriKind.RelativeOrAbsolute);}return new Uri(values[0].ToString(), UriKind.RelativeOrAbsolute);}return null;}public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture){ if (value != null){var uri = (Uri)value;var uriString = uri.OriginalString;if (uri.OriginalString.Contains(";component/")){uriString = uriString.Substring(uriString.IndexOf("/") + 1);}return new object[] {uriString, uriString}; }//return Binding.DoNothing;} #endregion IMultiValueConverter Members}
<Frame Grid.Column="2" x:Name="ContentFrame" JournalOwnership="OwnsJournal" NavigationUIVisibility="Visible"><Frame.Source><MultiBinding Converter="{StaticResource MultiBindConverter}"><Binding Path="SelectedValue" ElementName="Nav_ListBox" Mode="TwoWay" /><Binding Path="SelectedValue" ElementName="SublevelListbox" Mode="TwoWay" /></MultiBinding></Frame.Source></Frame>