/// <summary>
        /// Creates a new <see cref="OpenMultipleDirectoriesDialog" />.
        /// </summary>
        public OpenMultipleDirectoriesDialog()
            : base()
        {
            m_openMultipleDirectoriesControl = null;

            Loaded   += LoadedHandler;
            Unloaded += UnloadedHandler;
        }
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            if (m_openMultipleDirectoriesControl != null)
            {
                m_openMultipleDirectoriesControl.Cancel -= CancelHandler;
                m_openMultipleDirectoriesControl.DirectoriesSelected -= OpenMultipleDirectoriesControlDirectoriesSelectedHandler;
            }

            m_openMultipleDirectoriesControl = Template.FindName(OpenMultipleDirectoriesControlName, this) as OpenMultipleDirectoriesControl;
        }