Combobox dropdown doesn't work

Sep 2, 2014 at 10:34 AM
Edited Sep 2, 2014 at 10:42 AM
Hi,

I have been playing with the library and everything works fine except with the combobox. For some reason the combobox is not accepting the mouse click in order to drop down the items. The only way to select a different item is by navigating with the tab key from the keyboard until the combobox is focused and finally dropdown using the down arrow key from the keyboard.

Have someone expirience this problem before?? i am not a WPF guru so i might be missing something really simple, but so far I have checked all the documentation and I cannot find anything wrong.

Below my home.xaml page. The name of the combobox is cbProjectEnvironment:
<UserControl x:Class="PWArchiveDesktop.Pages.Home"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         mc:Ignorable="d" 
         d:DesignHeight="300" d:DesignWidth="300"
         xmlns:advanced="clr-namespace:PWArchiveDesktop.WpfUserControls.PwDataSourceTree">
<Grid Style="{StaticResource ContentRoot}">
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="6"/>
        <ColumnDefinition Width="5*"/>
    </Grid.ColumnDefinitions>

    <ScrollViewer Grid.Column="0" Margin="{StaticResource SplitLeft}">
        <advanced:PwDataSourceTree PWArchiveTreeSelectedItemChanged="PwDataSourceTree_PWArchiveTreeSelectedItemChanged" />
    </ScrollViewer>
    <GridSplitter Grid.Column="1" />
    <Grid Grid.Column="2" Margin="{StaticResource SplitRight}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="6"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0" >

                <DataGrid Name="dgPwProjectItems"
                          VirtualizingPanel.IsVirtualizing="True"
                          VirtualizingPanel.IsContainerVirtualizable="True"
                          VirtualizingPanel.VirtualizationMode="Recycling"
                          SelectionMode="Single"
                          SelectionUnit="FullRow"
                          AutoGenerateColumns="False"
                          DataContext="{Binding}"
                          ItemsSource="{Binding}" SelectionChanged="dgPwProjectItems_SelectionChanged">
                    <DataGrid.RowStyle>
                        <Style TargetType="{x:Type DataGridRow}">
                            <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
                            <Style.Triggers>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter Property="FontWeight" Value="Bold" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </DataGrid.RowStyle>

                                            <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding ItemName}"
                                            CanUserSort="True"
                                            Header="Name"
                                            IsReadOnly="True"/>
                        <DataGridTextColumn Binding="{Binding ItemDesc}"
                                            CanUserSort="True"
                                            Header="Description"
                                            IsReadOnly="True"/>
                        <DataGridTextColumn Binding="{Binding FileName}"
                                            CanUserSort="True"
                                            Header="File Name"
                                            IsReadOnly="True"/>
                    </DataGrid.Columns>
                </DataGrid>

            </Grid>
            <GridSplitter Grid.Row="1" />
            <Grid Grid.Row="2" >
                <Border>
                    <StackPanel Margin="0,2,0,0"
                    Orientation="Horizontal"
                    d:LayoutOverrides="GridBox">
                    <StackPanel>
                        <StackPanel Height="35" Orientation="Horizontal">
                            <StackPanel>
                                <StackPanel Height="35" Orientation="Horizontal">
                                    <Grid VerticalAlignment="Center">
                                        <TextBlock Margin="2,5" Text="Criteria:" />
                                    </Grid>
                                        <ComboBox Name="cbProjectEnvironment"
                                                  Width="150"
                                                  Height="23"
                                                  Margin="2,5"
                                                  DisplayMemberPath="EnvName"
                                                  SelectedValuePath="EnvNo" 
                                                  IsEditable="True"
                                                  Background="Transparent"
                                                    DataContext="{Binding}"
                                                    ItemsSource="{Binding}" 
                                                 />

                                    </StackPanel>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
                </Border>


                <DataGrid Name="gdPwObjectDetails" />
            </Grid>
        </Grid>    
    </Grid>

</Grid>
</UserControl>
Sep 3, 2014 at 2:52 PM
Hi all,

Is anyone having this issue :( .

I have tried with a different wpf application without using the Modern UI library and the combobox seem to be working fine. It looks that there is a conflict between the comboboxes and the Moder UI library.

Is someone using a combobox with this library??

Regards
JChoy
Sep 3, 2014 at 4:51 PM
My Apologies for this thread... I have found the issue. I had a bad xaml definition. Please ignore this thread
Marked as answer by jorgechoypernia on 9/3/2014 at 8:51 AM