Esempio n. 1
0
        /// <summary>
        /// 列表选中状态变化时的事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tab_SelectionChange(object sender, RoutedEventArgs e)
        {
            var tabButton = sender as MyTabButton;

            var arge = new MyTabSelectionChangeArge(TabSelectionChangeEvent, this);

            arge._Form     = tabButton._ContentForm;
            arge._FormName = tabButton._ContentFormName;
            arge._IsActive = tabButton._IsSelected;
            RaiseEvent(arge);
        }
Esempio n. 2
0
        /// <summary>
        /// 关闭Tab
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tab_Close(object sender, RoutedEventArgs e)
        {
            var tabButton = sender as MyTabButton;

            _RemoveTab(tabButton._ContentFormName);

            var arge = new RoutedEventArgs(ItemClickEvent, this);

            RaiseEvent(arge);

            var argeChange = new MyTabSelectionChangeArge(TabSelectionChangeEvent, this);

            argeChange._FormName = tabButton._ContentFormName;
            argeChange._IsActive = false;
            RaiseEvent(argeChange);
        }