public void ClearBinds() { foreach (var bvm in Binds) { bvm.Bind.Dispose(); } Binds.Clear(); SelectedBind = null; OnPropertyChanged("Binds"); OnPropertyChanged("SelectedBind"); }
public void UpdateBinds() { Binds.Clear(); if (_Binds.Count < 1) { return; } foreach (Hotkey bk in _Binds) { if (Binds.ContainsKey(bk.Keys)) { Binds[bk.Keys] = bk.Function; continue; } Binds.Add(bk.Keys, bk.Function); } }
/// <summary> /// Removes a binding. /// </summary> /// <param name="owner">the object that owns the property.</param> /// <param name="propertyName">the property to bind.</param> public static void Clear(object owner, string propertyName) { Binds binds = BindsLookup.GetOrCreateValue(owner); binds.Clear(propertyName); }