5 Answers, 1 is accepted
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 21 Sep 2012, 01:16 PM
Hello Steven,
The easiest way would be a "hybrid" approach with XamlReader.Load(...) like this:
Greetings,
Bart.
The easiest way would be a "hybrid" approach with XamlReader.Load(...) like this:
BarSeries series =
new
BarSeries();
series.PointTemplate = System.Windows.Markup.XamlReader.Load(@"
<DataTemplate xmlns=
""
http:
//schemas.microsoft.com/winfx/2006/xaml/presentation"">
<Rectangle Fill=
""
Yellow
""
HorizontalAlignment=
""
Stretch
""
VerticalAlignment=
""
Stretch
""
/>
</DataTemplate>")
as
DataTemplate;
Greetings,
Bart.
0
Steven
Top achievements
Rank 1
answered on 21 Sep 2012, 01:29 PM
thanks for the response.
is a slightly harder way possible with new ABC() { veriousProperies = X} possible?
is a slightly harder way possible with new ABC() { veriousProperies = X} possible?
0
Steven
Top achievements
Rank 1
answered on 25 Sep 2012, 12:33 PM
Telerik: Is the parse method the only way forward?
0
Hello Steven,
Yes, this is the only way in Silverlight -- check this msdn article here ("The XAML usage that defines the content for creating a data template is not exposed as a settable property. It is special behavior built into the XAML processing of a DataTemplate object element.").
Kind regards,
Giuseppe
the Telerik team
Yes, this is the only way in Silverlight -- check this msdn article here ("The XAML usage that defines the content for creating a data template is not exposed as a settable property. It is special behavior built into the XAML processing of a DataTemplate object element.").
Kind regards,
Giuseppe
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.
0
Steven
Top achievements
Rank 1
answered on 01 Oct 2012, 05:52 AM
thanks for suggesting this direction. I'm getting better at debugging and mostly attribute errors to parse or namespace errors now. It seems a bit of a waste of XAML power to need to do it this way, but so long as it is used sparingly I guess this is okay.