Is there a tool/utility that allows discovery of object/relationships of WPF controls?
For example. If it weren't for the sample code which showed PercentValue in the XamPieChart.ToolTip I wouldn't have had a place to discover that it was a part of the PieSliceDataContext via Visual Studio's right click - Go To Definition.
<ig:XamPieChart.ToolTip> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding ItemLabel}" /> <TextBlock Text=" ("/> <TextBlock Text="{Binding PercentValue, Converter={StaticResource percentConverter}}" /> <TextBlock Text=")"/> </StackPanel> </ig:XamPieChart.ToolTip>
The documentation isn't helping me. Or at least I'm not holding it right if it could. There has to be a way to point to the XamPieChart and drill down through it to discover the pieces and parts. Anyone have a good way within Visual Studio (object browser isn't cutting it) or via an outside tool or utility to discover the pieces and parts of a Infragistics control?
David,
Yes, it's understood that snoop is limited to only inspecting what is only in view. And we do not have nor do I know of any other 3rd party inspector tool. It's also still unclear which resources, of ours, you need to properly accomplish your task(s).
I strongly recommend reviewing our API documentation and our samples browser, since they are our best resources for getting started and discovering the chart's capabilities and features.
Here is a link to our documentation page to our Pie Chart control for WPFhttp://help.infragistics.com/doc/WPF/2016.1/CLR4.0/?page=PieChart.html
You can download our WPF samples browser with our platform installer used to install our WPF controls.It's normally installed at this location:C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Infragistics\
WPF resources are listed here:http://es.infragistics.com/support/product-help-downloads/wpf-help
In order to make improvements for our samples, documentation, API etc. please give us examples where you are having any difficulty so we can act on making the necessary changes to help you and the community out.
Let me know if you have any questions regarding this matter.
I am in the process of evaluating the Infragistics Pro package. So I started by attempting to create a Pie chart in an existing WPF application that we have that mimics the current Pie chart. Keep in mind I am new to WPF and XAML.
In the process I became quite frustrated. After a few days I determined the problem is I don't have a good way to grasp the parts and pieces of a control. Typically I can start writing code and dot into objects and discover what I need. Not in this exercise. I found myself taking code from the samples into visual studio so that I could right click on a XAML binding to then Go To Definition to find out where in the world did that come from ... only to find some new object it was contained within that doesn't show in the visual tree and isn't revealed by dotting in to the PieChart object.
An example of this was I was attempting to show the label, value, and percentage on each pie slice in a DataTemplate. Only problem was the datatemplate didn't show anything.
<DataTemplate x:Key="pieSliceLabelTemplate"> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Label}" /> <TextBlock Text="{Binding Value, Converter={StaticResource currencyConverter}}" /> <TextBlock Text="{Binding Percentage}" </StackPanel> </DataTemplate>
Through some trials I determined that it liked "Item." so that meant the datacontext was something other than the root of my collection which was obviously being bound properly as the pie seemed about right.
<DataTemplate x:Key="pieSliceLabelTemplate"> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Item.Label}" /> <TextBlock Text="{Binding Item.Value, Converter={StaticResource currencyConverter}}" /> <TextBlock Text="{Binding Item.Percentage}" </StackPanel> </DataTemplate>
But even with this the Item.Percentage didn't work. So at this point I need a way to discover "Item." which didn't make sense because the PieChart was bound and LabelMemberPath and ValueMemberPath didn't require the qualification.
<ig:XamPieChart Name="pieChart" ItemsSource="{Binding MyDatasource}" LabelMemberPath="Label" ValueMemberPath="Value" Legend="{Binding ElementName=Legend}" AllowSliceExplosion="True" AllowSliceSelection="True" SliceClick="SliceClicked" LabelsPosition="BestFit" StartAngle="270" Padding="10" OthersCategoryThreshold="0" />
Regardless at this point I had label and value showing via the DataTemplate, I just needed to figure out the Percentage. So back to the samples I went and found a nested ToolTip under PieChart
<ig:XamPieChart.ToolTip> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding ItemLabel}" /> <TextBlock Text=" ("/> <TextBlock Text="{Binding PercentValue, StringFormat=p, Converter={StaticResource conv}}" /> <TextBlock Text=")"/> </StackPanel> </ig:XamPieChart.ToolTip>
So from this I see that PercentValue is the name of a field. Without the samples I would not have a way to determine that ToolTip was nested and had a property of PercentValue which also I had no way to discover.
So I right clicked on PercentValue in the sample XAML and did a Go To Definition and found it is within
Member of Infragistics.Controls.Charts.PieSliceDataContext
PieSliceDataContext came from out of nowhere to me. In Object Browser if I drill down through PieChart I don't see to find anything in there that is a property, datatype, or even a comment that hints at PieSliceDataContext.
So at this point I know I'm not dealing with the DataContext I set on the PieChart but a different DataContext that I'm guessing (still don't know for sure, again why need some tool to help discover) is independent of the PieChart.
So now it seems there is not a way to build a single DataTemplate that encompasses the Label, Value, and PercentValue. At least that is where I am currently.
Going back to the bigger picture. This is just an example of my initial attempts at evaluating. After taking a step back I can see that it isn't going to be possible to get any significant traction until I resolve the discoverability problem.
I took a look at Snoop. Thanks for the suggestion. It seems to be limited to what is visible in the application. Typically what I'm looking to do is discover things that allow me to then put them in XAML to make them visible. So it looks like Snoop is too far along the discovery chain to be helpful for my condition.
Does the above help me help you with "...listing your application's requirements and what you are having issues with..."?
Hello David,
If you are looking for a tool to inspect and spy our controls then I recommend downloading Snoop for WPF.
https://snoopwpf.codeplex.com/
I recommend listing your application's requirements and what you are having issues with so that I can assist you accordingly. Thank you.