Web- und Software Development

DelegateCommand – Visual Studio Snippet

Folgendes Snippet erstellt bei der Eingabe von vmc <tab> ein MVVM Command (DelegateCommand). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 #region Command: MyBtnClickCommand private DelegateCommand _MyBtnClickCommand;   public ICommand MyBtnClickCommand { get { if (_MyBtnClickCommand == [...]

Read the rest of this entry »

ViewModelProperty – Visual Studio Snippet

Folgendes Snippet erstellt bei der Eingabe von vmprop ein ViewModelProperty 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #region ViewModelProperty ViewModelPropertyName private string _privatePropertyName; public string ViewModelPropertyName { get { return _privatePropertyName; } set { _privatePropertyName = value; RaisePropertyChanged(m => m.ViewModelPropertyName); } } #endregion Kopiert wird das Snippet [...]

Read the rest of this entry »

Liste von doppelten Einträgen befreien

So kann es gehen, ich hab mir eine Methode geschrieben, die doppelte Items aus einer Liste entfernen soll. Funktioniert soweit auch gut. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 public List<T> RemoveDoubleListItems<T>(List<T> list) { var newList = new List<T>(); var keys = new Dictionary<T, object>();   foreach [...]

Read the rest of this entry »

DependencyProperty – Visual Studio Snippet

Folgendes Snippet erstellt bei der Eingabe von dpprop <tab> ein DependencyProperty 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #region DependencyProperty: propertyName public propertyType propertyName { get { return (propertyType)GetValue(propertyNameProperty); } set { SetValue(propertyNameProperty, value); } }   public static readonly DependencyProperty propertyNameProperty = DependencyProperty.Register("propertyName", typeof(propertyType), typeof(ownerType), [...]

Read the rest of this entry »