Click here to Skip to main content
15,920,438 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Storing Signature in sql server database Pin
Eslam Afifi12-Mar-09 13:00
Eslam Afifi12-Mar-09 13:00 
GeneralRe: Storing Signature in sql server database Pin
vsaratkar13-Mar-09 2:13
vsaratkar13-Mar-09 2:13 
GeneralRe: Storing Signature in sql server database Pin
Eslam Afifi13-Mar-09 2:58
Eslam Afifi13-Mar-09 2:58 
GeneralRe: Storing Signature in sql server database Pin
AndyTexas22-Jun-09 6:08
AndyTexas22-Jun-09 6:08 
GeneralRe: Storing Signature in sql server database Pin
Eslam Afifi22-Jun-09 12:24
Eslam Afifi22-Jun-09 12:24 
QuestionWPF Tween Library Pin
emptythetill12-Mar-09 1:56
emptythetill12-Mar-09 1:56 
AnswerRe: WPF Tween Library Pin
Pete O'Hanlon12-Mar-09 2:25
mvePete O'Hanlon12-Mar-09 2:25 
GeneralRe: WPF Tween Library Pin
emptythetill13-Mar-09 2:50
emptythetill13-Mar-09 2:50 
QuestionWorking with 3D models created in Blender Pin
Etienne_12312-Mar-09 0:11
Etienne_12312-Mar-09 0:11 
AnswerRe: Working with 3D models created in Blender Pin
Pete O'Hanlon12-Mar-09 0:27
mvePete O'Hanlon12-Mar-09 0:27 
QuestionWPF: How to make resizing custom datagrid column? [modified] Pin
MichalDawn11-Mar-09 22:58
MichalDawn11-Mar-09 22:58 
AnswerRe: WPF: How to make resizing custom datagrid column? Pin
ABitSmart11-Mar-09 23:40
ABitSmart11-Mar-09 23:40 
GeneralRe: WPF: How to make resizing custom datagrid column? Pin
MichalDawn11-Mar-09 23:51
MichalDawn11-Mar-09 23:51 
GeneralRe: WPF: How to make resizing custom datagrid column? Pin
ABitSmart11-Mar-09 23:53
ABitSmart11-Mar-09 23:53 
GeneralRe: WPF: How to make resizing custom datagrid column? [modified] Pin
MichalDawn12-Mar-09 0:02
MichalDawn12-Mar-09 0:02 
QuestionHow to render pixels of a bitmap correctly? Pin
Andy@11-Mar-09 5:03
Andy@11-Mar-09 5:03 
AnswerRe: How to render pixels of a bitmap correctly? Pin
Insincere Dave11-Mar-09 16:14
Insincere Dave11-Mar-09 16:14 
GeneralRe: How to render pixels of a bitmap correctly? Pin
Andy@12-Mar-09 2:59
Andy@12-Mar-09 2:59 
GeneralRe: How to render pixels of a bitmap correctly? Pin
Insincere Dave12-Mar-09 6:56
Insincere Dave12-Mar-09 6:56 
GeneralRe: How to render pixels of a bitmap correctly? Pin
Andy@17-Mar-09 4:20
Andy@17-Mar-09 4:20 
QuestionBind an attached property Pin
Pauwels Bart11-Mar-09 3:55
Pauwels Bart11-Mar-09 3:55 
AnswerRe: Bind an attached property Pin
ABitSmart11-Mar-09 16:57
ABitSmart11-Mar-09 16:57 
QuestionRe: Bind an attached property Pin
Pauwels Bart11-Mar-09 19:45
Pauwels Bart11-Mar-09 19:45 
AnswerRe: Bind an attached property Pin
ABitSmart11-Mar-09 21:00
ABitSmart11-Mar-09 21:00 
Ok, here are my thoughts on this.

Pauwels Bart wrote:
don't exactly know how to bind an attached property so I guess that is the problem

I think the binding syntax is correct.

"The value which an element has for an attached property is stored by that element, not by the element which exposes the attached property." - Josh Smitt[^]
Relating to your scenario. You would have the SCOLOR attached property in each of the Annotation object. And I am sure that is not what you are expecting ?

What you want is, SCOLOR behave like a "SelectedItem" or "SelectedColor". I would suggest, make a dependency property named "SelectedAnnotation" in your Canvas which will hold the currently selected Annotation object. When an annotation object is selected, set this DP to the selected annotation object.

Bind the button to the SelectedItem property in NFSICanva. Something like this,
IsEnabled="{Binding Path=SelectedAnnotation.SCOLOR , ElementName=nsifCanvas, Mode=OneWay, Converter={StaticResource convGraphicColour}}"

Pauwels Bart wrote:
GetSCOLOR never gets called.

Take a look here Debugging dependency properties[^]
QuestionRe: Bind an attached property Pin
Pauwels Bart11-Mar-09 22:33
Pauwels Bart11-Mar-09 22:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.