I'm creating a programmatic skin for a slider track that is based on the value of the slider. The examples I've seen get the containing control from the skin's parent, and indeed for a button skin this works fine, but for my trackSkin, the parent is always null.
Is there something special I need to do in this case?
Direct parent is UIComponent and its parent is the HSlider.
So try something like this
hslider = parent.parent as HSlider;
This is wierd - I was checking parent yesterday and it was always null - today it's not null, so the proposed solution works.
But I'm still comfused...