title: DataTemplate with array of strings
body: <p>I have a <code>ContentPresenter</code> which takes a values with two types <code>string</code> and <code>string[]</code>. How to make visual view, based on value type.</p>
  
  <p>My XAML code looks like</p>
  
  <pre><code>&lt;ContentPresenter Content="{Binding Path=Value}"&gt;
      &lt;ContentPresenter.Resources&gt;
          &lt;DataTemplate DataType="{x:Type System:String}"&gt;
              &lt;TextBox Text="{Binding Path=Content, RelativeSource={RelativeSource AncestorType={x:Type ContentPresenter}}}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;DataTemplate DataType="{x:Type System:String[]}"&gt;
              &lt;ComboBox SelectedItem="???" ItemsSource="{???}"&gt;
              &lt;/ComboBox&gt;
          &lt;/DataTemplate&gt;
      &lt;/ContentPresenter.Resources&gt;
  &lt;/ContentPresenter&gt;
  </code></pre>
  
  <p>Also, need some way to receive selected item. </p>
  
  <p>For a <code>string</code> value, code looks:</p>
  
  <pre><code>public class Text
  {
      string Value { set; get; }
  }
  </code></pre>
  
  <p>And, for a <code>string[]</code></p>
  
  <pre><code>public class Combo
  {
      string Value { set; get; }
      string[] Items { set; get; }
  }
  </code></pre>
  
  <p>This code work fine only for <code>string</code> type. I don't know how to do it for <code>string[]</code>.</p>