예제 #1
0
        private void HeaderButton_Click(object sender, RoutedEventArgs e)
        {
            GnosisTileTabItem tabItem = (sender as GnosisToggleButton).CommandParameter as GnosisTileTabItem;
            int index = (int)tabItem.Tag;

            this.SelectedIndex = index;
        }
예제 #2
0
        public void LoadTabItem(IGnosisTileTabItemImplementation tabItemImplementation)
        {
            GnosisTileTabItem tabItem = (GnosisTileTabItem)tabItemImplementation;

            //tabItem.HeaderTemplate = this.FindResource("TabHeader") as DataTemplate;
            this.Items.Add(tabItem);
            tabItem.Tag        = this.Items.Count - 1;
            CurrentTileTabItem = tabItem;
            // string xaml = XamlWriter.Save(this);
        }
예제 #3
0
        //private void GnosisTileTab_PropertyChanged(object sender, PropertyChangedEventArgs e)
        //{
        //    //switch (e.PropertyName)
        //    //{

        //    //}
        //}

        public void SelectTabItem(GnosisTileTabItem item)
        {
            CurrentTileTabItem = item;
            Dispatcher.BeginInvoke((Action)(() => this.SelectedItem = item));

            foreach (GnosisTileTabItem child in this.Items)
            {
                if (child.HeaderButton != null)
                {
                    if (child != item)
                    {
                        child.HeaderButton.Active = false;
                    }
                    else
                    {
                        child.HeaderButton.Active = true;
                    }
                }
            }
        }
예제 #4
0
        private void btnClose_Click(object sender, RoutedEventArgs e)
        {
            GnosisTileTabItem item = (sender as Button).CommandParameter as GnosisTileTabItem;

            CloseTabItemHandler.Invoke(item);
        }