JuanC Posted July 20, 2009 Report Share Posted July 20, 2009 This one is a little hard to describe but I am sure you have seen it before in magazines or newspapers. Although our API allows you to set brushes in code we will try to do all it XAML as it will allow more tweaking later. Here is our first attempt at showing an image on each bar [color= blue]<[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart [/color][color= red]Gallery[/color][color= blue]="Bar"[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.Series[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]SeriesAttributes[/color][color= blue]/> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.Series[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.AllSeries[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes[/color][color= blue]> <[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes.Template[/color][color= blue]> <[/color][color= #a31515]DataTemplate[/color][color= blue]> <[/color][color= #a31515]Canvas[/color][color= blue]> <[/color][color= #a31515]Rectangle [/color][color= red]Width[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Width}" [/color][color= red]Height[/color][color= blue]="{[/color][color= #a31515]Binding [/color][color= red]Path[/color][color= blue]=Height}"> <[/color][color= #a31515]Rectangle.Fill[/color][color= blue]> <[/color][color= #a31515]ImageBrush [/color][color= red]ImageSource[/color][color= blue]="C:\Temp\WorldMap.png"/[/color][color= blue]> </[/color][color= #a31515]Rectangle.Fill[/color][color= blue]> </[/color][color= #a31515]Rectangle[/color][color= blue]> </[/color][color= #a31515]Canvas[/color][color= blue]> </[/color][color= #a31515]DataTemplate[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes.Template[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]AllSeriesAttributes[/color][color= blue]> </[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart.AllSeries[/color][color= blue]></[/color][color= #a31515]cfx[/color][color= blue]:[/color][color= #a31515]Chart[/color][color= blue]>[/color] Nothing earth shattering, we are binding width and height of the rectangle to the Width and Height of the logical items we will create, note that we do not need to worry about Left and Top, this is handled internally. We are creating a Canvas because we plan to add more visual elements later. And this is what we get. Obviously this is not what we are looking for, actually there is no feature that I am aware of in WPF that allows you to draw a rectangle and specify the Link to comment Share on other sites More sharing options...
acscalma Posted June 25, 2012 Report Share Posted June 25, 2012 _,@Doug I wanted to writing to you through email but I got the "Delivery to the following recipient failed permanently" error. It looks like you wrote your email wrong. Can you please contact me? http://google.com Link to comment Share on other sites More sharing options...
Anonymous Posted April 11, 2013 Report Share Posted April 11, 2013 Pingback from rimonabantexcellence site title Link to comment Share on other sites More sharing options...
Anonymous Posted April 23, 2013 Report Share Posted April 23, 2013 Pingback from propecia Link to comment Share on other sites More sharing options...
Recommended Posts