상속: Windows.UI.Xaml.Controls.ContentControl
예제 #1
0
        private void AddItem(object item, int index = -1)
        {
            index = index < 0 ? _stack.Children.Count : index;
            var control = new IndicatorItem
            {
                SelectedForeground = SelectedForeground,
                Foreground         = Foreground,
                Background         = Background,
                Style           = this.ItemContainerStyle,
                ContentTemplate = this.ItemTemplate,
                Content         = item
            };

            _stack.Children.Insert(index, control);
            PlugControl(control);
        }
예제 #2
0
 private void UnplugControl(IndicatorItem control)
 {
     control.IsSelectedChanged -= OnSelectedItemChanged;
 }
예제 #3
0
 private void AddItem(object item, int index = -1)
 {
     index = index < 0 ? _stack.Children.Count : index;
     var control = new IndicatorItem
     {
         SelectedForeground = SelectedForeground,
         Foreground = Foreground,
         Background = Background,
         Style = this.ItemContainerStyle,
         ContentTemplate = this.ItemTemplate,
         Content = item
     };
     _stack.Children.Insert(index, control);
     PlugControl(control);
 }
예제 #4
0
 private void UnplugControl(IndicatorItem control)
 {
     control.IsSelectedChanged -= OnSelectedItemChanged;
 }