Inheritance: Windows.UI.Xaml.Controls.ContentControl
コード例 #1
0
ファイル: Indicator.Items.cs プロジェクト: xyzrs/TVHelpers
        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
ファイル: Indicator.Items.cs プロジェクト: xyzrs/TVHelpers
 private void UnplugControl(IndicatorItem control)
 {
     control.IsSelectedChanged -= OnSelectedItemChanged;
 }