I have a simple Silverlight Toolkit chart which is bound to the following types of archives:
< Code> Public class chartAitam class {public string name {get; Set; } Public double standards {receive; Set; } Public String Url {get; Set; }}I can get a chart to display name (X-axis) and value (Y-axis) correctly, but I can use labels on the x-axis The X-XML label on the hyperlinkbutton URL property should be something similar to the following:
& lt; Hyperlink button content = "* name property here *" navigetry = "* url property *" targetName = "_ blank" & gt; & Lt; / HyperlinkButton & gt; I got an example, which allowed me to set the axilabile style for X-axis so that labels are now hyperlinkbutton. The problem is that I assign assignments to the URL property as a navigator. Unable to bind Any ideas?
First of all, I can post the full code and then clarify.
& lt; UserControl.Resources & gt; & Lt; Style x: key = "hyperlink style" target type = "charting: axilabell" & gt; & Lt; Setter Estates = "Template" & gt; & Lt; Setter.Value & gt; & Lt; ControlTemplate TargetType = "Charting: Exilelabel" & gt; & Lt; Hyperlink button content = "{binding name}" navigetry = "{binding url}" target name = "_ blank" /> & Lt; / ControlTemplate & gt; & Lt; /Setter.Value> & Lt; / Setter & gt; & Lt; / Style & gt; & Lt; /UserControl.Resources> & Lt; Charting: Chart & gt; & Lt; Charting: Chart.Series & gt; & Lt; Charting: columnisms itemsource = "{binding item}" dependency = binding = "{binding value}" independent value binding = "{binding}" & gt; & Lt; Charting: ColumnSeries.IndependentAxis & gt; & Lt; Charting: Categoryxes Orientation = "X" axilabal stale = "{static resource hyperlink style}" /> & Lt; / Charting: ColumnSeries.IndependentAxis & gt; & Lt; / Charting: ColumnSeries & gt; & Lt; / Charting: Chart.Series & gt; & Lt; / Charting: Chart & gt;
The trick is in this line:
Independent value binding = "{binding}"
This binding By using you pass the entire object into the independent axis, not just a property. And after that you can get properties of the bound object in the label's control template:
Content = "{binding name}" navigetry = "{binding url}"
binding keyword looks awkward instead of
TemplateBinding , but it is allowed and it works. And there is a comment:
url should contain the prefix in the
http property. This is
www . does not work with
Comments
Post a Comment