Posted 14 years ago
by justin stofle
I am trying to override the default context menu of your DatePicker control. I tried doing it in xaml (see below), however I only see the default cut, copy, paste commands. This leads me to believe you build your context menu in code. I really dont want to attach to the Loaded event and then override the context menu. Do you have any suggestions? Thanks
[Modified at 06/16/2010 08:02 PM]
<shared:DatePicker Behavior="{Binding Path=Behavior}"
Foreground="{TemplateBinding ContentControl.Foreground}"
Margin="{TemplateBinding ContentControl.Margin}"
VerticalAlignment="Center"
Height="{Binding Source={StaticResource Settings}, Path=Default.FieldHeight, Mode=TwoWay}"
Value="{Binding Path=Value, Converter={StaticResource DateOnlyConverter}}">
<shared:DatePicker.ContextMenu>
<ContextMenu>
<MenuItem Header="test1" />
</ContextMenu>
</shared:DatePicker.ContextMenu>
</shared:DatePicker>