You can add a key so you can set the datacontext in the xaml instead behind code:
<local:RangeValuesEditTemplateSelector x:key="RVETS">
Then for example set the outer grid's DataContext:
<Grid DataContext={Binding Source = {StaticResource RVETS}} //Something like this I think
Then anything within that grid you can just bind directly to the property you set behind code.
Not sure if this is useful or not, just thought I'd share :)