locked
Sketchflow - Combo Box with header? RRS feed

  • Question

  • When I add a Sketch style combo box with multiple items, the header is emtpy. After you select an item, that item it is populated in the header. What would be the best way to mock up a combo box that has a title ex: "Select City" that is not visible when you select an item  ex: "Seattle".

    Thanks!

    Friday, October 8, 2010 5:57 AM

Answers

  • You should be able to use the first combobox item as the header, and set the selected index of the combobox to 0, like this:

     

    <ComboBox Margin="54,81,247,0" Style="{StaticResource ComboBox-Sketch}" VerticalAlignment="Top" IsDropDownOpen="False" SelectedIndex="0">
          <ComboBoxItem Content="Select City:" Style="{StaticResource ComboBoxItem-Sketch}"/>
          <ComboBoxItem Content="Minneapolis" Style="{StaticResource ComboBoxItem-Sketch}"/>
          <ComboBoxItem Content="St. Paul" Style="{StaticResource ComboBoxItem-Sketch}"/>
        </ComboBox>
    

    Friday, October 8, 2010 1:05 PM
    Moderator

All replies

  • You should be able to use the first combobox item as the header, and set the selected index of the combobox to 0, like this:

     

    <ComboBox Margin="54,81,247,0" Style="{StaticResource ComboBox-Sketch}" VerticalAlignment="Top" IsDropDownOpen="False" SelectedIndex="0">
          <ComboBoxItem Content="Select City:" Style="{StaticResource ComboBoxItem-Sketch}"/>
          <ComboBoxItem Content="Minneapolis" Style="{StaticResource ComboBoxItem-Sketch}"/>
          <ComboBoxItem Content="St. Paul" Style="{StaticResource ComboBoxItem-Sketch}"/>
        </ComboBox>
    

    Friday, October 8, 2010 1:05 PM
    Moderator
  • Chuck,

    You're becoming my personal tech support for Blend.  I will post your answers on my blog (blendesinger.com) and share the love.

    Thanks for this answer.  I've got two more questions coming today.  The check is in the mail. ;-)

     

    Tony

    Friday, October 8, 2010 8:51 PM