RibbonComboBox: "Items collection must be empty...

Topics: Bootstrappers & IoC
Dec 6, 2013 at 8:03 PM
Using the ribboncombobox:
    <Ribbon x:Name="RibbonWin"  SelectedIndex="0" Margin="0,5" VerticalAlignment="Center">
        <RibbonTab Header="Home" KeyTip="H" VerticalAlignment="Center" >
            <RibbonTextBox Label="Time" Margin="0,-20,0,0" x:Name="MaxNumberOfReadings"></RibbonTextBox>
        <RibbonTab Header="Settings" KeyTip="I">
            <RibbonComboBox Label="Port" Margin="0,-30,10,10" Width="150" cal:Message.Attach="[Event DropDownOpened]=[ReloadPorts]" x:Name="AvailablePorts" >
                <RibbonGallery SelectedValue="Green">
Getting an exception in mefbootstrapper.OnStartup():

Items collection must be empty before using ItemsSource

Any ideas?
Dec 7, 2013 at 3:58 AM
CM is attempting to bind to AvailablePorts property in your viewmodel, but since you have RibbonGallery already in it; it assumes that you are double binding, the error is from the .NET not CM.

that would be my guess