0
Vote

Controls / DropDownButton

description

Find how to not display the menu when empty

comments

TheCamel wrote Oct 19, 2010 at 8:33 PM

I try this before, but it does not work in the database explorer on the connect button, because of binding ??

<controls:DropDownButton Content="Connect..." Name="DropDownMenu" ToolTip="Connect to a registered data source in the workspace">
                <ButtonBase.ContextMenu>
                    <ContextMenu ItemsSource="{Binding Workspace.DataSources}">
                        <ContextMenu.ItemTemplate>
                                <DataTemplate>
                                    <MenuItem Header="{Binding Name}" Click="MenuItem_Click"/>
                                </DataTemplate>
                        </ContextMenu.ItemTemplate>
                    </ContextMenu>    
                </ButtonBase.ContextMenu>
            </controls:DropDownButton>

wrote Feb 27, 2011 at 3:44 PM

wrote Feb 14, 2013 at 12:20 AM