private void Window_Loaded(object sender, RoutedEventArgs e) { if (!DesignerProperties.GetIsInDesignMode(this)) { _clientLogic.ClientLogicUI += new EventHandler <ClientLogicUIEventArgs>(_clientLogic_ClientLogicUI); ((INotifyCollectionChanged)listViewScripts.Items).CollectionChanged += new NotifyCollectionChangedEventHandler(ListViewScripts_CollectionChanged); // refresh script names _clientLogic.AdminGetScriptNames(); } }