当前位置: 首页>>代码示例>>C#>>正文


C# UIElementCollection.Remove方法代码示例

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


在下文中一共展示了UIElementCollection.Remove方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MakeVideoCall

 internal static void MakeVideoCall(string primaryId, UIElementCollection uiElementCollection, int timeoutInSeconds, string secondaryId = null)
 {
     CommunicationView commView = new CommunicationView(primaryId, timeoutInSeconds);
     uiElementCollection.Add(commView);
     commView.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
     commView.VerticalAlignment = System.Windows.VerticalAlignment.Center;
     commView.Width = 700;
     commView.Height = 400;
     commView.CommunicationEnded += (p1, p2) =>
     {
         if (commView.TimedOut &&
             string.IsNullOrEmpty(secondaryId)==false)
         {
             commView.InitializeUI(secondaryId);
             secondaryId = null;
             return;
         }
         else
         {
             commView.Visibility = Visibility.Collapsed;
         uiElementCollection.Remove(commView);
         }
     };
 }
开发者ID:infragistics-labs,项目名称:VirtualReceptionist,代码行数:24,代码来源:Utilities.cs

示例2: RemoveFrom

 public void RemoveFrom(UIElementCollection collection)
 {
     collection.Remove(circle);
 }
开发者ID:Miraxek,项目名称:X90,代码行数:4,代码来源:ControlO.cs

示例3: AdvanceFrame

        public void AdvanceFrame(UIElementCollection children, bool instructing/*, List<ShoopDoup.Models.DataObject> data*/)
        {
            // Move all things by one step, accounting for gravity
            for (int i = 0; i < things.Count; i++)
            {
                Thing thing = things[i];
                Image apple = apples[i];
                Label label = appleLabels[i];

                thing.center.Offset(thing.xVelocity, thing.yVelocity);
                thing.yVelocity += gravity * sceneRect.Height;
                thing.yVelocity *= airFriction;
                thing.xVelocity *= airFriction;
                thing.theta += thing.spinRate;

                if (thing.state != ThingState.Dissolving)
                {
                    apple.SetValue(Canvas.LeftProperty, thing.center.X - thing.size);
                    apple.SetValue(Canvas.TopProperty, thing.center.Y-25);
                    label.SetValue(Canvas.LeftProperty, thing.center.X - thing.size*.84);
                    label.SetValue(Canvas.TopProperty, thing.center.Y);
                    label.SetValue(Canvas.ZIndexProperty, 100);
                }

                // bounce off walls
                if ((thing.center.X - thing.size < 0) || (thing.center.X + thing.size > sceneRect.Width))
                {
                    thing.xVelocity = -thing.xVelocity;
                    thing.center.X += thing.xVelocity;
                }

                // Then get rid of one if any that fall off the bottom
                if (thing.center.Y - thing.size > sceneRect.Bottom)
                {
                    thing.state = ThingState.Remove;
                }

                // Get rid of after dissolving.
                if (thing.state == ThingState.Dissolving)
                {
                        thing.state = ThingState.Remove;
                }
                things[i] = thing;
                apples[i] = apple;
                appleLabels[i] = label;
            }

            // Then remove any that should go away now
            for (int i = 0; i < things.Count; i++)
            {
                Thing thing = things[i];
                Image apple = apples[i];
                Label label = appleLabels[i];
                //double appleLocation = appleLocations[i];
                //String text = labelText[i];
                if (thing.state == ThingState.Remove)
                {
                    things.Remove(thing);
                    apples.Remove(apple);
                    appleLabels.Remove(label);
                    //appleLocations.Remove(appleLocation);
                    //labelText.Remove(text);
                    children.Remove(apple);
                    children.Remove(label);
                    i--;
                }
            }

            // Create any new things to drop based on dropRate
            if (!instructing && (things.Count < maxThings) && (rnd.NextDouble() < dropRate / targetFrameRate) && (polyTypes != PolyType.None))
            {
                PolyType[] alltypes = {PolyType.Square};
                byte r = baseColor.R;
                byte g = baseColor.G;
                byte b = baseColor.B;

                if (doRandomColors)
                {
                    r = (byte)(rnd.Next(215) + 40);
                    g = (byte)(rnd.Next(215) + 40);
                    b = (byte)(rnd.Next(215) + 40);
                }
                else
                {
                    r = (byte)(Math.Min(255.0, (double)baseColor.R * (0.7 + rnd.NextDouble() * 0.7)));
                    g = (byte)(Math.Min(255.0, (double)baseColor.G * (0.7 + rnd.NextDouble() * 0.7)));
                    b = (byte)(Math.Min(255.0, (double)baseColor.B * (0.7 + rnd.NextDouble() * 0.7)));
                }

                PolyType tryType = PolyType.None;
                do
                {
                    tryType = alltypes[rnd.Next(alltypes.Length)];
                } while ((polyTypes & tryType) == 0);

                DropNewThing(tryType, shapeSize, 0,Color.FromRgb(r, g, b),children, null /*,data*/);
            }
        }
开发者ID:tjsavage,项目名称:shoopdoup,代码行数:98,代码来源:FallingShapes.cs

示例4: draw

 public void draw(UIElementCollection _element)
 {
     _element.Remove(LeaderBoardCanvas);
     LeaderBoardCanvas.Children.Clear();
     LeaderBoardCanvas.Children.Add(lbRectangle);
     LeaderBoardCanvas.Children.Add(LeaderBoardHeader);
     LeaderBoardCanvas.Children.Add(lbline);
     for (int i = 0; i < 10; i++)
     {
         LeaderBoardCanvas.Children.Add(LBList[i].lbName);
         LeaderBoardCanvas.Children.Add(LBList[i].lbScore);
     }
     LeaderBoardCanvas.Children.Add(lbButton);
     _element.Add(LeaderBoardCanvas);
 }
开发者ID:CS321-Development-Group,项目名称:SimonSaysKinect,代码行数:15,代码来源:LeaderBoard.cs

示例5: RemoveFrom

 public void RemoveFrom(UIElementCollection collection)
 {
     collection.Remove(line1);
     collection.Remove(line2);
 }
开发者ID:Miraxek,项目名称:X90,代码行数:5,代码来源:ControlX.cs

示例6: RemoveFrom

 public void RemoveFrom(UIElementCollection collection)
 {
     collection.Remove(rectangle);
 }
开发者ID:Miraxek,项目名称:X90,代码行数:4,代码来源:ControlNAN.cs


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