wpfwpf-extended-toolkit

DateTimePicker Missing Dropdown Button


I have two xctk:DateTimePickers on a user control. I don't think that is the issue, but their IsEnabled property is bound to a radio button IsChecked property on the same user control. The issue is that the only one of them can have the drop-down button that reveals the calendar at a time. When it is loaded, only the last one to load has one, but when they are being enabled, only the other has it. There is a similar issue with the TimePicker on their calendar display. Missing button example.

The issue persists even without the resources so there is probably nothing relevant there. Might also be important to note that the button is actually there, it appears that the arrow is what's missing. Here is the xaml for this particular part:

<StackPanel HorizontalAlignment="Stretch" Margin="10">
        <RadioButton GroupName="dateOptions" IsChecked="True" ToolTip="Show the most recent date at 1Hz refresh rate." Margin="{StaticResource DefaultMargin }">Scope Mode</RadioButton>
        <RadioButton x:Name="RadioButtonLogBrowser" IsChecked="{Binding IsDateRange, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}" GroupName="dateOptions" ToolTip="Browse History by date range" Margin="{StaticResource DefaultMargin }">Log Browser Mode</RadioButton>
        <Grid Margin="20,0,0,0" IsEnabled="{Binding IsChecked, ElementName=RadioButtonLogBrowser,Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <Label  Margin="{StaticResource DefaultMargin }">Start Date:</Label>
            <xctk:DateTimePicker HorizontalAlignment="Stretch" x:Name="StartDate" Grid.Row="1" Margin="{StaticResource DefaultMargin }" >
                <xctk:DateTimePicker.Resources>
                    <ResourceDictionary>
                        <ResourceDictionary.MergedDictionaries>
                            <ResourceDictionary Source="..\..\GeneralResources.xaml" />
                        </ResourceDictionary.MergedDictionaries>
                    </ResourceDictionary>
                </xctk:DateTimePicker.Resources>
            </xctk:DateTimePicker>
                <Label Grid.Row="2" Margin="{StaticResource DefaultMargin }">Start Date:</Label>
            <xctk:DateTimePicker HorizontalAlignment="Stretch" x:Name="EndDate" Grid.Row="3" Margin="{StaticResource DefaultMargin }">
                <xctk:DateTimePicker.Resources>
                    <ResourceDictionary>
                        <ResourceDictionary.MergedDictionaries>
                            <ResourceDictionary Source="..\..\GeneralResources.xaml" />
                        </ResourceDictionary.MergedDictionaries>
                    </ResourceDictionary>
                </xctk:DateTimePicker.Resources>
            </xctk:DateTimePicker>
        </Grid>```

Solution

  • To whoever have this problem in the future: That was a known component issue and it was solved in the last release version 4.3.0.

    In DateTimePicker, using more than one custom DateTimePicker now displays the dropDown button on each of the DateTimePicker.

    ref: https://github.com/xceedsoftware/wpftoolkit/wiki/Improvements-in-v4.3.0