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