Select to view content in your preferred language

How we can customize FeatureDataForm source code

538
3
05-30-2012 06:03 AM
shariqueabdul
Emerging Contributor
Hi All

i have downloaded ESRI Silverlight toolkit source code from codeplex.com and i need to change/extend some functionality of FeatureDataForm such as "add cancel button beside Apply to close the window or header/footer etc . so how can i do this .i tried but could not change ... please help me , i stuck here ...


regards
Shar
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
If you are just adding a button, I think you can get by with just updating style: http://blogs.esri.com/esri/arcgis/2010/05/28/localizing-arcgis-controls/ and implementing its click event. But if you feel you would need to modify code/behavior, in the Toolkit source code, look for "CommitButton" in FeatureDataForm.Theme.xaml, this is the "Apply" button.
0 Kudos
shariqueabdul
Emerging Contributor
Hi jennifednery

thanks for prompt reply ....

i already found apply button(from resource.resx) (whose name is commitbutton in featuredataform.theme.xml) and i also added "Cancel button" on upper right corner but when i handle its click event its give following error ...
"Line: 56
Error: Unhandled Error in Silverlight Application
Code: 2531   
Category: ParserError      
Message: Failed to assign to property 'System.Windows.Controls.Primitives.ButtonBase.Click'.    
File:     
Line: 108    
Position: 160 "

i just added button in xaml and write some code to popup message box on button1_Click event .

and how can i change the Dll name from ESRI.ArcGIS.Client.Toolkit

plz help
0 Kudos
DominiqueBroux
Esri Frequent Contributor
You can't directly add an event handler to default template of a templated control.
To hook up to events of anything in the template you have either to create a template part or to create a command to bind to.

That being said, as Jennifer mentionned, you likely don't need to modify the code of the control. Styling the control should do the trick.
0 Kudos