thexder1
13 years agoContributor
Name mapping
Is there a way to create name mapping on the fly?
The scenario that I am running into is I have a WPF application where there is a job queue, For each job there is a button that can say start or pause. The problem that I am running into is it looks like all of the start buttons are mapped the same so if I try to target one it will not be unique enough to know which one to select. The only way that I can find to target it uniquely is to use a property called data context which is going to be different for each job. When looking at the object through object spy or name mapping editor the parent always looses connection.
When looking at the object path every start button is excatly the same even the properties other than the DataContext. The only way that I can think of to get this to work would be if there was a way to create a name map on the fly to target the DataContext.Name that is the same as the name of the job that is assigned to the job for the current iteration of a data-driven loop.
The scenario that I am running into is I have a WPF application where there is a job queue, For each job there is a button that can say start or pause. The problem that I am running into is it looks like all of the start buttons are mapped the same so if I try to target one it will not be unique enough to know which one to select. The only way that I can find to target it uniquely is to use a property called data context which is going to be different for each job. When looking at the object through object spy or name mapping editor the parent always looses connection.
When looking at the object path every start button is excatly the same even the properties other than the DataContext. The only way that I can think of to get this to work would be if there was a way to create a name map on the fly to target the DataContext.Name that is the same as the name of the job that is assigned to the job for the current iteration of a data-driven loop.