• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Controls.UIElementCollection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Controls.UIElementCollection的典型用法代码示例。如果您正苦于以下问题:C# UIElementCollection类的具体用法?C# UIElementCollection怎么用?C# UIElementCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UIElementCollection类属于System.Windows.Controls命名空间,在下文中一共展示了UIElementCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: TreeGridViewRowPresenter

		public TreeGridViewRowPresenter()
		{
			_childs = new UIElementCollection(this, this);
			DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.FromProperty(ColumnsProperty, typeof(TreeGridViewRowPresenter));
			if (dpd != null)
				dpd.AddValueChanged(this, (s, e) => EnsureLines());
		}
开发者ID:xbadcode,项目名称:Rubezh,代码行数:7,代码来源:TreeGridViewRowPresenter.cs


示例2: SudokuCell

        public SudokuCell(UIElementCollection panel, int bsize, SudokuBoard sb)
        {
            this.sb = sb;
            this.bsize = bsize;
            this.children = new List<SudokuCell>();
            this.panel = panel;
            isLeaf = false;
            int size = bsize * bsize;
            int bss = size * size;
            int[] data = new int[bss];
            for (var i = 0; i < bss; i++) data[i] = i;

            for (var i = 0; i < bsize; i++)
            {
                for (var j = 0; j < bsize; j++)
                {
                    var t = new List<int>();
                    for (var k = i * bsize; k < (i + 1) * bsize; k++)
                    {
                        for (var l = j * bsize; l < (j + 1) * bsize; l++)
                        {
                            t.Add(data[k * size + l]);
                        }
                    }
                    var sc = new SudokuCell(this.panel, t.ToArray(), j, i, bsize, sb);
                    children.Add(sc);
                }
            }
        }
开发者ID:vabc3,项目名称:KarSudoku,代码行数:29,代码来源:SudokuCell.cs


示例3: AddPasswordBox

 private static void AddPasswordBox(
     UIElementCollection labelCollection, UIElementCollection inputCollection,
     UIElementCollection checkBoxCollection,
     string content, object dataContext, string key, int index)
 {
     var viewModel = (INotifyPropertyChanged)dataContext;
     labelCollection.Add(new Label() { Content = content });
     var control = new PasswordBox() { DataContext = dataContext, TabIndex = index };
     var parameters = (IDictionary<string, string>)((dynamic)dataContext).Dictionary;
     control.Password = parameters[key];
     PropertyChangedEventHandler onSourceChanged = (sender, e) =>
     {
         if (e.PropertyName != key)
         {
             return;
         }
         if (control.Password == parameters[key])
         {
             return;
         }
         control.Password = parameters[key];
     };
     viewModel.PropertyChanged += onSourceChanged;
     control.PasswordChanged += (sender, e) =>
     {
         if (parameters[key] != control.Password)
         {
             parameters[key] = control.Password;
         }
     };
     control.Unloaded += (sender, e) => viewModel.PropertyChanged -= onSourceChanged;
     inputCollection.Add(new UserControl() { Content = control });
     checkBoxCollection.Add(new FrameworkElement());
 }
开发者ID:gitter-badger,项目名称:pecastarter5,代码行数:34,代码来源:ComponentFactory.cs


示例4: ItemCount

        public static double ItemCount(CalendarAppointmentItem currentApp, UIElementCollection children)
        {
            double count = 0;
            foreach (UIElement child in children)
            {
                if (child is CalendarAppointmentItem)
                {
                    var currentChild = child as CalendarAppointmentItem;

                    var cStart = currentApp.GetValue(TimeSlotPanel.StartTimeProperty) as DateTime?;
                    var cEnd = currentApp.GetValue(TimeSlotPanel.EndTimeProperty) as DateTime?;
                    var toTest = new DateRange(cStart.Value, cEnd.Value);

                    var aStart = currentChild.GetValue(TimeSlotPanel.StartTimeProperty) as DateTime?;
                    var aEnd = currentChild.GetValue(TimeSlotPanel.EndTimeProperty) as DateTime?;
                    var current = new DateRange(aStart.Value, aEnd.Value);

                    if (toTest.Overlaps(current))
                    {
                        count++;
                    }
                }
            }
            return count;
        }
开发者ID:seniorOtaka,项目名称:ndoctor,代码行数:25,代码来源:Overlapping.cs


示例5: Draw

 public void Draw(UIElementCollection children)
 {
     foreach (SingleVortex sv in reds)
         children.Add(sv);
     foreach (SingleVortex sv in blues)
         children.Add(sv);
 }
开发者ID:verbatium,项目名称:KinectFish,代码行数:7,代码来源:Vortices.cs


示例6: ElementMovOrRes

		public ElementMovOrRes(CommandStack commandStack, UIElementCollection selection, Rect newrect, Rect oldrect, int editingOperationCount)
			: base(commandStack) {
			_selection = selection;
			_newrect = newrect;
			_oldrect = oldrect;
			_editingOperationCount = editingOperationCount;
		}
开发者ID:paradoxfm,项目名称:ledx2,代码行数:7,代码来源:UndoInkElement.cs


示例7: Draw

        public void Draw(UIElementCollection children)
        {
            if (!isAlive)
                return;

            DateTime cur = DateTime.Now;

            foreach (var segment in segments)
            {
                PlayerUtils.Segment seg = segment.Value.GetEstimatedSegment(cur);
                if (seg.IsCircle())
                {
                    var circle = new Ellipse();
                    circle.Width = seg.radius * 2;
                    circle.Height = seg.radius * 2;
                    circle.SetValue(Canvas.LeftProperty, seg.x1 - seg.radius);
                    circle.SetValue(Canvas.TopProperty, seg.y1 - seg.radius);
                    circle.Stroke = brJoints;
                    circle.StrokeThickness = 1;
                    circle.Fill = brBones;
                    children.Add(circle);
                }
            }

            // Remove unused players after 1/2 second.
            if (DateTime.Now.Subtract(lastUpdated).TotalMilliseconds > 500)
                isAlive = false;
        }
开发者ID:grazulis,项目名称:KinectRainbowSynth,代码行数:28,代码来源:Player.cs


示例8: AddAllStrokesAtOriginalIndex

		private void AddAllStrokesAtOriginalIndex(UIElementCollection toBeAdded) {
			foreach (UIElement elm in toBeAdded) {
				//int strokeIndex = (int)elm.GetPropertyData(STROKE_INDEX_PROPERTY);
				//if (strokeIndex > _commandStack.StrokeCollection.Count)
				//  strokeIndex = _commandStack.StrokeCollection.Count;
				_commandStack.ElementCollection.Add(elm);
			}
		}
开发者ID:paradoxfm,项目名称:ledx2,代码行数:8,代码来源:UndoInkElement.cs


示例9: Viewport3DDecorator

 /// <summary>
 /// Creates the Viewport3DDecorator
 /// </summary>
 public Viewport3DDecorator()
 {
     // create the two lists of children
     _preViewportChildren = new UIElementCollection(this, this);
     _postViewportChildren = new UIElementCollection(this, this);
             
     // no content yet
     _content = null;
 }           
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:12,代码来源:Viewport3DDecorator.cs


示例10: Viewport3DDecorator

        /// <summary>
        /// Initializes a new instance of the <see cref="Viewport3DDecorator"/> class. 
        ///     Creates the Viewport3DDecorator
        /// </summary>
        protected Viewport3DDecorator()
        {
            // create the two lists of children
            this._preViewportChildren = new UIElementCollection(this, this);
            this._postViewportChildren = new UIElementCollection(this, this);

            // no content yet
            this._content = null;
        }
开发者ID:tddold,项目名称:High-Quality-Code-Homeworks,代码行数:13,代码来源:Viewport3DDecorator.cs


示例11: ElementAddOrRem

		public ElementAddOrRem(CommandStack commandStack, InkCanvasEditingMode editingMode,
			UIElementCollection added, UIElementCollection removed, int editingOperationCount)
			: base(commandStack) {
			_editingMode = editingMode;

			_added = added;
			_removed = removed;

			_editingOperationCount = editingOperationCount;
		}
开发者ID:paradoxfm,项目名称:ledx2,代码行数:10,代码来源:UndoInkElement.cs


示例12: SetBlocksMouseEvent

 private void SetBlocksMouseEvent( UIElementCollection collection )
 {
     foreach ( UIElement block in collection )
     {
         //block.PreviewMouseLeftButtonDown += new MouseButtonEventHandler( m_dragController.OnPreviewMouseLeftButtonDown );
         block.MouseLeftButtonDown += new MouseButtonEventHandler( m_dragController.OnPreviewMouseLeftButtonDown );
         block.PreviewMouseMove += new MouseEventHandler( m_dragController.OnPreviewMouseMove );
         //block.MouseMove += new MouseEventHandler( m_dragController.OnMouseMove );
         block.PreviewMouseLeftButtonUp += new MouseButtonEventHandler( m_dragController.OnPreviewMouseUp );
     }
 }
开发者ID:yoursalary,项目名称:EPL,代码行数:11,代码来源:MainWindow.xaml.cs


示例13: getBloodType

 private BloodType getBloodType(UIElementCollection radioButtonList)
 {
     //convert the selected radioButton to a BloodType
     BloodType b = BloodType.O;
     foreach (RadioButton r in radioButtonList)
     {
         if ((bool)r.IsChecked)
             b = (BloodType)Enum.Parse(typeof(BloodType), r.Content.ToString());
     }
     return b;
 }
开发者ID:reubencummins,项目名称:AssignmentsEtc,代码行数:11,代码来源:MainWindow.xaml.cs


示例14: AddTextBox

 private static void AddTextBox(
     UIElementCollection labelCollection, UIElementCollection inputCollection,
     UIElementCollection checkBoxCollection,
     string labelText, object dataContext, string key, int tabIndex)
 {
     labelCollection.Add(new Label() { Content = labelText });
     var control = new TextBox() { DataContext = dataContext, TabIndex = tabIndex };
     control.SetBinding(TextBox.TextProperty, new Binding(key));
     inputCollection.Add(new UserControl() { Content = control });
     checkBoxCollection.Add(new FrameworkElement());
 }
开发者ID:gitter-badger,项目名称:pecastarter5,代码行数:11,代码来源:ComponentFactory.cs


示例15: CalculateHeightOfColumn

        /// <summary>
        /// Calculates the height of column.
        /// </summary>
        /// <param name="i">The starting point.</param>
        /// <param name="startOfColumnElementIndex">Start index of the of column element.</param>
        /// <param name="endOfColumnElementIndex">End index of the of column element.</param>
        /// <param name="children">The children.</param>
        /// <returns></returns>
        public static int CalculateHeightOfColumn(int i, int[] startOfColumnElementIndex, int[] endOfColumnElementIndex, UIElementCollection children)
        {
            var thisColHeight = 0;
            for (var j = startOfColumnElementIndex[i]; j <= endOfColumnElementIndex[i]; j++)
            {
                var height = (int)children[j].DesiredSize.Height;
                thisColHeight += height;
            }

            return thisColHeight;
        }
开发者ID:FoundOPS,项目名称:server,代码行数:19,代码来源:DynamicWrapPanelTools.cs


示例16: TransitionPresenter

        public TransitionPresenter()
        {
            _children = new UIElementCollection(this, null);
              ContentPresenter currentContent = new ContentPresenter();
              _currentHost = new AdornerDecorator();
              _currentHost.Child = currentContent;
              _children.Add(_currentHost);

              ContentPresenter previousContent = new ContentPresenter();
              _previousHost = new AdornerDecorator();
              _previousHost.Child = previousContent;
        }
开发者ID:edealbag,项目名称:bot,代码行数:12,代码来源:TransitionPresenter.cs


示例17: Draw

        public static void Draw(UIElementCollection children)
        {
            if (bannerText == null)
                    return;

                Label text = bannerText.GetLabel();
                if (text == null)
                {
                    bannerText = null;
                    return;
                }
                children.Add(text);
        }
开发者ID:grazulis,项目名称:KinectRainbowSynth,代码行数:13,代码来源:BannerText.cs


示例18: CreateHousehold

 public CreateHousehold(string fName, string lName, string pOQ, string gen, Boolean head, string aGroup, string ethnicG, string rel, UIElementCollection toggle)
 {
     firstName = fName;
     lastName = lName;
     patientOQ = pOQ;
     headOfHouse = head;
     gender = gen;
     ageGroup = aGroup;
     ethnicGroup = ethnicG;
     relationToHead = rel;
     togglePatientProblems = toggle;
     InitializeComponent();
 }
开发者ID:WKlingonsmith,项目名称:FCS-Project,代码行数:13,代码来源:CreateHousehold.xaml.cs


示例19: Menu

        public Menu(UIElementCollection _menu, string _menuname)
        {
            menu = new Canvas();
            left = new Canvas();
            leftcenter = new Canvas();
            center = new Canvas();
            rightcenter = new Canvas();
            right = new Canvas();
            menuName = _menuname;
            parent = _menu;
                        
            right.Name = menuName + "Right";
            right.Width = 115;
            right.RenderTransform = new RotateTransform(11);
            right.Margin = new Thickness(483, 12, 0, 0);

            rightcenter.Name = menuName + "RightCenter";
            rightcenter.Width = 115;
            rightcenter.RenderTransform = new RotateTransform(5.5);
            rightcenter.Margin = new Thickness(363, 0, 0, 0);

            center.Name = menuName + "Center";
            center.Width = 115;
            center.RenderTransform = new RotateTransform(0);
            center.Margin = new Thickness(243, 0, 0, 0);

            leftcenter.Name = menuName + "LeftCenter";
            leftcenter.Width = 115;
            leftcenter.RenderTransform = new RotateTransform(-5.5);
            leftcenter.Margin = new Thickness(123, 12, 0, 0);

            left.Name = menuName + "Left";
            left.Width = 115;
            left.RenderTransform = new RotateTransform(-11);
            left.Margin = new Thickness(4, 36, 0, 0);

            menu.Name = menuName;
            menu.Height = 145;
            menu.Width = 600;
            menu.HorizontalAlignment = HorizontalAlignment.Center;
            menu.VerticalAlignment = VerticalAlignment.Top;
            menu.Margin = new Thickness(0,0,0,0);

            menu.Children.Add(left);
            menu.Children.Add(leftcenter);
            menu.Children.Add(center);
            menu.Children.Add(rightcenter);
            menu.Children.Add(right);

            menu.Tag = "unhidden";
        }
开发者ID:CS321-Development-Group,项目名称:SimonSaysKinect,代码行数:51,代码来源:Menu.cs


示例20: SudokuBoard

        public SudokuBoard(UIElementCollection coll)
        {
            string file = @"g:\1.txt";
            try
            {
                sudokee = sm.LoadFromFile(file);
            }
            catch (Exception)
            {
                MessageBox.Show("Error during loading.", "Error");
            }

            cell = new SudokuCell(coll,sudokee.BaseSize,this);
        }
开发者ID:vabc3,项目名称:KarSudoku,代码行数:14,代码来源:SudokuBoard.cs



注:本文中的System.Windows.Controls.UIElementCollection类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Controls.UserControl类代码示例发布时间:2022-05-26
下一篇:
C# Controls.UIElement类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap