Inheritance: Windows.UI.Xaml.Controls.ContentControl
Example #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);
        }
Example #2
0
 private void UnplugControl(IndicatorItem control)
 {
     control.IsSelectedChanged -= OnSelectedItemChanged;
 }
Example #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);
 }
Example #4
0
 private void UnplugControl(IndicatorItem control)
 {
     control.IsSelectedChanged -= OnSelectedItemChanged;
 }