0

I am developing an application and I am using from some libraries, the Ribbon of Microsoft. At one point, I carried the information on the component, but can not seem to set the initial value. Follows the code:

<r:RibbonComboBox 
    x:Name="rcbFontFamily" 
    SelectionBoxWidth="160"
    IsEditable="True">
    <r:RibbonGallery
        Name="_rgFontFamily"
        ScrollViewer.VerticalScrollBarVisibility="Visible"
        Command="{StaticResource FontFamilyHandler}">
        <r:RibbonGalleryCategory
            Name="_rgcFontFamily"
            ItemsSource="{Binding Source={x:Static Fonts.SystemFontFamilies}}"/>
    </r:RibbonGallery>
</r:RibbonComboBox>

I can set the value by mouse click, but I can not bring the combobox with an initial value. How to do this?

Daniel Lemke
  • 1,966
  • 18
  • 24

1 Answers1

0

Have you checked this example? Note the SelectedValue

MDSN Doc

Jef Patat
  • 999
  • 1
  • 10
  • 26
  • Yes, but I could not adapt to my case. I can set the value by mouse click, but I can not bring the combobox with an initial value. – Paulo Freitas Jan 12 '16 at 12:40
  • I tried [this](http://stackoverflow.com/questions/15555449/how-to-databind-selecteditem-of-ribboncombobox) and [this](https://social.msdn.microsoft.com/Forums/vstudio/en-US/1a9cf85f-b8ad-406a-b84b-9785a9ef1f2a/ribboncombobox-not-showing-default-selected-item-when-content-is-not-string?forum=wpf) – Paulo Freitas Jan 13 '16 at 10:09