Skip to content

ContextMenu of DatePickerTextBox is not displayed #3007

Description

@hkurando

Bug explanation

I have rewritten the DatePicker Style to display a customized ContextMenu when right-clicking on the DatePickerTextBox.

In the code below, the ContextMenu that was displayed until 4.2.1 will be displayed as the default menu after updating to 4.3.0 or higher.

        <DatePicker Width="100">
            <DatePicker.Resources>
                <Style
                    x:Key="MaterialDesignDatePickerTextBox"
                    BasedOn="{StaticResource MaterialDesignDatePickerTextBox}"
                    TargetType="{x:Type DatePickerTextBox}">
                    <Setter Property="ContextMenu">
                        <Setter.Value>
                            <ContextMenu>
                                <MenuItem Header="1" />
                                <MenuItem Header="2" />
                                <MenuItem Header="3" />
                            </ContextMenu>
                        </Setter.Value>
                    </Setter>
                </Style>
            </DatePicker.Resources>
        </DatePicker>

Version

4.3.0 or higher

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugevaluation requiredItems is pending review or evaluation by the team

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions