Skip to main content
Home Forums Silverlight Design Designing with Silverlight Customizing ComboBox Control with Blend
3 replies. Latest Post by Raju Hosamani on May 25, 2009.
(0)
Aravinda...
Member
157 points
39 Posts
05-25-2009 1:08 AM |
I am trying to customize a combobox control to look like split button control (http://blogs.msdn.com/jfoscoding/archive/2005/11/10/491535.aspx) in Blend by Editing the template of ComboBox where in I have placed a button control in the place of the textblock control to give that apperance . Now I have to bind the control of Button Click event to ComboBox Click event. Can anybody help how can I do that?
Raju Hos...
300 points
54 Posts
05-25-2009 5:12 AM |
Hi Aravindakumar,
we can bind any control event to any other control event.
There is no click event for combobox, so we can call SelectionChanged event of combobox in button's click event, as shown below code
}
If both Child (button ) and parent (combobox) events eventArgs are same, then we can map child control event to parent control in .XAML, as shown below
<
Please mark it as answered, if this meets your requirementThanks, Raju
05-25-2009 5:51 AM |
Hi, You idea holds good for external controls but the thing is I am customizing the template of the ComboBox to place a button and group the controls to form ComboBox again, in that case whether the internal controls are exposed outside for event subscription like you have specified?
05-25-2009 7:17 AM |
Aravindakumar.V:whether the internal controls are exposed outside for event subscription like you have specified?
YES internal controls are ALSO exposed outside for event subscription like I shown in above example