I'm looking for a way to display a range indicator in the label panel of the xamDataGrid.
I've tried tapping in to the LabelPanelStyle of the axis, which gives me access to the panel I need; however, when I attempt to databind properties in the LabelPanelStyle, I'm surprised to find that the datacontext for the panel style is not the same datacontext for the containing axis. Instead, it seems to be the datacontext for the containing xamDataChart.
In the attached project, the chart display is driven by an object that exposes a view model for the YAxis. The axis view model exposes a red gradient BackgroundBrush property that I would like to be used in the labelpanel background, and for example purposes the chart view model exposes a solid green brush as its BackgroundBrush property. The binding operation on the LabelPanelStyle setter appears to reference the data context for the chart, not the axis - when I run the attached example, the label panel is solid green, not a red gradient.
I realize I can fix this example easily by changing the LabelPanelStyle binding expressions to reference the YAxisViewModel.BackgroundBrush; however, in production the data is not this simple and there could be several axes that require this processing. I see no way to determine which label panel is associated with which axis...
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.