I can not find a normal example on the use of Dependency property. So I registered the property in the helpers class.
private static readonly DependencyProperty FilterApplyProperty= DependencyProperty.Register("FilterApply", typeof(ICommand),typeof(EffectListSelection),new PropertyMetadata(1,OnValuePropertyChanged)); Here is the constructor
public iCommand FilterValue { get { return (iCommand) GetValue(FilterApplyProperty); } set { SetValue(FilterApplyProperty, value);} } And the method itself
private void OnClick(object sender, RoutedEventArgs e) { string listviewName = AssociatedObject.Name; temp = (e as ItemClickEventArgs).ClickedItem as FiltersViewModel; MainViewModel.Effect = temp.Type; this.EffectApply.Execute(this.temp.Type); <--- } Understood. Just needed to call a team and everything works.