/// <summary>
        /// Dispose of disposable things on unload.
        /// </summary>
        /// <param name="sender">The control.</param>
        /// <param name="e">The event arguments.</param>
        private void OnUnloaded(object sender, RoutedEventArgs e)
        {
            GroupList groupList = this.otherGroups.ItemsSource as GroupList;

            if (groupList != null)
            {
                groupList.Dispose();
            }
        }
Ejemplo n.º 2
0
        void ReleaseDesignerOutlets()
        {
            if (AddButton != null)
            {
                AddButton.Dispose();
                AddButton = null;
            }

            if (DownButton != null)
            {
                DownButton.Dispose();
                DownButton = null;
            }

            if (GroupList != null)
            {
                GroupList.Dispose();
                GroupList = null;
            }

            if (GroupNameBox != null)
            {
                GroupNameBox.Dispose();
                GroupNameBox = null;
            }

            if (RemoveButton != null)
            {
                RemoveButton.Dispose();
                RemoveButton = null;
            }

            if (SongList != null)
            {
                SongList.Dispose();
                SongList = null;
            }

            if (UpButton != null)
            {
                UpButton.Dispose();
                UpButton = null;
            }
        }