title: Unable to cast object of type 'MS.Internal.NamedObject' to type 'System.IConvertible
body: <p>I have a tab control inside which there are number of tab items.I am trying to apply multivalue converter to the visibility property of tabitem.</p>
  
  <pre><code>&lt;TabControl&gt;
   &lt;TabItem
              DataContext="{Binding TabModel[3]}"
              x:Name="Tab3"
              Header="Test"&gt;
                  &lt;TabItem.Visibility&gt;
                      &lt;MultiBinding Converter="{StaticResource settingsvisibility}"&gt;
                          &lt;Binding Path="UserRole"/&gt;
                          &lt;Binding Path="UserName"/&gt;
                      &lt;/MultiBinding&gt;
                  &lt;/TabItem.Visibility&gt;
                  &lt;tabView:view /&gt;
              &lt;/TabItem&gt;&lt;/tabControl&gt;
  </code></pre>
  
  <p>My converter code is as follow as </p>
  
  <pre><code> public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
          {
              Visibility visiblity = Visibility.Collapsed;
              int id = System.Convert.ToInt32(values[0]);
              string tabName = values[1].ToString();
  ...
  ....
  ...
  }
  </code></pre>
  
  <p>But the values are not getting passed properly. I am getting the below exception</p>
  
  <blockquote>
    <p>Unable to cast object of type 'MS.Internal.NamedObject' to type
    'System.IConvertible . Can anyone help me to get rid of this issue?</p>
  </blockquote>