Context menus and property binding

Topics: Conventions, Getting Started
Nov 4, 2011 at 3:57 PM


I am trying to create a popup menu for my user control using CM and decided to use the context menu element.  I understand that the context menu is not in the WPF visual tree so CM can not bind automatically.  In the CM Cheatsheet, I found how to attach a message to an action. Is there any syntax for properties? Here is my code:

                            <Border  CornerRadius="10" Width="110" Height="105">
                                    <Label x:Name="MyMessage" Content="{Binding MyMessage}" Width="70" Height="25"/>
                                    <Button x:Name="Save"  Width="70" cal:Message.Attach="Save">Save</Button>

For the button, I am using the Message attach function so CM know how to bind.

For the label I defaulted to WPF binding.  Is that what I should do or is there a "property.Attach" function I can use to tell CM what to bind to?

(I just want to make sure I am not missing anything since all property bindings on the cheat sheet are blank.)






Dec 4, 2011 at 9:11 PM

Default WPF Binding is the way to go !