INotofyPropertyChanged wpf : OKe so i'm using .net 4.6.1 with wpf application. We have a list -> ObservableCOllection we want to bind the collection to a listview thats need to have sorting alphabetically and auto updating upon new item in the collection. 
I use COllectionViewSource and searched here on stackoverflow for updating I need to use InotificationPropertyChanged. But for some reason it doesnt work :(.

object claas: 

    using System.Text;
    using System.Threading.Tasks;
    
    namespace ObservableCollection
    {
        public class AlarmTypes : INotifyPropertyChanged
        {
            public event PropertyChangedEventHandler PropertyChanged;
    
            private string name; 
            public AlarmTypes(string _name)
            {
                this.name = _name;
            }
    
            public string Name
            {
                get { return name; }
                set
                {
                    name = value;
                    OnPropertyChanged("Name");
                    
                }
            }
    
            
    
            protected void OnPropertyChanged(string prop)
            {
                PropertyChangedEventHandler handler = PropertyChanged;
                if (handler != null)
                {
                    handler(this, new PropertyChangedEventArgs(prop));
                }
            }
        }
    
       
    }



xaml file

    <Window x:Class="ObservableCollection.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:local="clr-namespace:ObservableCollection"
            xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
            xmlns:clr="clr-namespace:System;assembly=mscorlib"
            mc:Ignorable="d"
            Title="MainWindow" Height="450" Width="800">
        <Grid>
            
            
            <Grid.Resources>
                <CollectionViewSource x:Name="CollectionViewSource" x:Key="src" Source="{Binding alarmTypes }" IsLiveFilteringRequested="True">
                    <CollectionViewSource.LiveSortingProperties>
                        <clr:String>Name</clr:String>
                    </CollectionViewSource.LiveSortingProperties>
                    <CollectionViewSource.SortDescriptions>
                        <componentModel:SortDescription PropertyName="Name" />
                    </CollectionViewSource.SortDescriptions>
                </CollectionViewSource>
            </Grid.Resources>
    
    
    
            <ListView x:Name="lstAlarmTypes" HorizontalAlignment="Left" Height="319" Margin="585,48,0,0" VerticalAlignment="Top" Width="157" ItemsSource="{Binding Source={StaticResource src}}">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="Name"  DisplayMemberBinding="{Binding Name}" />
                    </GridView>
                </ListView.View>
            </ListView>
            <TextBox HorizontalAlignment="Left" Height="23" Margin="10,48,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Name="textBox1"/>
            <Button Content="Add item" HorizontalAlignment="Left" Margin="173,51,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
            <ListView x:Name="LstNames2" HorizontalAlignment="Left" Height="301" Margin="339,66,0,0" VerticalAlignment="Top" Width="180">
                <ListView.View>
                    <GridView>
                        <GridViewColumn Header="Name"  DisplayMemberBinding="{Binding Name}"/>
                    </GridView>
                </ListView.View>
            </ListView>
    
        </Grid>
    </Window>



xmal cs code: 


    using System;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using System.Windows.Navigation;
    using System.Windows.Shapes;
    
    namespace ObservableCollection
    {
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
        {
            private ObservableCollection<AlarmTypes> alarmTypes = new ObservableCollection<AlarmTypes>();
            private ObservableCollection<AlarmTypes> sortedTypes = new ObservableCollection<AlarmTypes>();
           
    
            public MainWindow()
            {
                InitializeComponent();
                LstNames2.ItemsSource = alarmTypes;
    
                var alarmType = new AlarmTypes("inbraak");            
                alarmTypes.Add(alarmType);
    
                var alarmType2 = new AlarmTypes("alarm");
                //alarmType.Name = textBox1.Text;
                alarmTypes.Add(alarmType2);
    
            }
    
            private void Button_Click(object sender, RoutedEventArgs e)
            {
                var alarmType = new AlarmTypes(textBox1.Text);
                //alarmType.Name = textBox1.Text;
                alarmTypes.Add(alarmType);
                
                
            }
        }
    }


I don't know if the inding doesn't work or its the property or I still need something else. The first list has a binding just to the Observable collection and that works when inputting data from the textbox. But the second listview that has the collectionViewSource apparently doesn't work. any ideas whats missing?
