76 references to Links
PresentationUI (2)
MS\Internal\Documents\RMPermissions.cs (2)
73requestFromLabel.Links[0].Description = referralName; 84requestFromLabel.Links.Clear();
System.Windows.Forms (32)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (18)
188Links.Add(new Link(this)); 275Links.Add(new Link(this)); 522Links.Clear(); 523Links.Add(new Link(0, -1)); // default 'magic' link. 538for (int i = 0; i < Links.Count; i++) 540Link link = Links[i]; 545Links[i].VisualRegion = textRegions[regionIndex]; 591Links[0].VisualRegion = visualRegion; 629List<CharacterRange> ranges = new(Links.Count + 1); 631foreach (Link link in Links) 1384if (FocusLink is null && Links.Count > 0) 1387foreach (Link link in Links) 1464FocusLink = Links[focusIndex]; 1487if (focusIndex < Links.Count) 1489test = Links[focusIndex]; 1509test = Links[focusIndex]; 1609return Links[0].Start != 0 || Links[0]._length != -1;
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (1)
58private int CurrentIndex => _owningLinkLabel.Links.IndexOf(_owningLink);
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (2)
168if (_owner.Links.Count > 1) 178if (_owner.Links.Count > 1)
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (6)
28=> !this.TryGetOwnerAs(out LinkLabel? owner) ? null : owner.Links.Count != 0 29? owner.Links[0].AccessibleObject 32=> !this.TryGetOwnerAs(out LinkLabel? owner) ? null : owner.Links.Count != 0 33? owner.Links[^1].AccessibleObject 42? owner.Links[index].AccessibleObject 47public override int GetChildCount() => this.TryGetOwnerAs(out LinkLabel? owner) ? owner.Links.Count : 0;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (3)
179Label.Links.Clear(); 205Label.Links.Clear(); 237LinkLabel.Link link = Label.Links.Add(links[i].X, links[i].Y, _verbs[i]);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
607CreateNewLink.Links.Clear(); 608CreateNewLink.Links.Add(0, editor.Text.Length, editor);
System.Windows.Forms.Tests (42)
LinkLabelTests.cs (7)
116_linkLabel.Links.Count.Should().Be(1); 117_linkLabel.Links[0].Visited.Should().BeTrue(); 123_linkLabel.Links.Add(new LinkLabel.Link(_linkLabel) { Visited = false }); 125_linkLabel.Links[0].Visited.Should().BeTrue(); 128_linkLabel.Links[0].Visited.Should().BeFalse(); 198_linkLabel.Links.Add(new LinkLabel.Link(_linkLabel) { Visited = true }); 211label.Links.Add(link);
System\Windows\Forms\AccessibleObjects\LinkLabel.Link.LinkAccessibleObjectTests.cs (27)
34linkLabel.Links.Add(new()); 39LinkAccessibleObject linkAccessibleObject = linkLabel.Links[index].AccessibleObject; 55Link link = linkLabel.Links[0]; 69linkLabel.Links.Add(new()); 72AccessibleObject linkLabelAccessibleObject1 = linkLabel.Links[0].AccessibleObject; 73AccessibleObject linkLabelAccessibleObject2 = linkLabel.Links[1].AccessibleObject; 74AccessibleObject linkLabelAccessibleObject3 = linkLabel.Links[2].AccessibleObject; 75AccessibleObject linkLabelAccessibleObject4 = linkLabel.Links[3].AccessibleObject; 91linkLabel.Links.Add(new()); 94AccessibleObject linkLabelAccessibleObject1 = linkLabel.Links[0].AccessibleObject; 95AccessibleObject linkLabelAccessibleObject2 = linkLabel.Links[1].AccessibleObject; 96AccessibleObject linkLabelAccessibleObject3 = linkLabel.Links[2].AccessibleObject; 97AccessibleObject linkLabelAccessibleObject4 = linkLabel.Links[3].AccessibleObject; 119linkLabel.Links.Add(new()); 122LinkAccessibleObject linkAccessibleObject = linkLabel.Links[linkIndex].AccessibleObject; 133LinkAccessibleObject linkAccessibleObject = linkLabel.Links[0].AccessibleObject; 146LinkAccessibleObject accessibleObject = linkLabel.Links[0].AccessibleObject; 160LinkAccessibleObject accessibleObject = linkLabel.Links[0].AccessibleObject; 172LinkAccessibleObject accessibleObject = linkLabel.Links[0].AccessibleObject; 184LinkAccessibleObject accessibleObject = linkLabel.Links[0].AccessibleObject; 199LinkAccessibleObject linkAccessibleObject = linkLabel.Links[0].AccessibleObject; 216linkLabel.Links.Add(new(start, name.Length)); 220for (int index = 0; index < linkLabel.Links.Count; index++) 222string actual = linkLabel.Links[index].AccessibleObject.Name; 234LinkAccessibleObject accessibleObject = linkLabel.Links[0].AccessibleObject; 246LinkAccessibleObject accessibleObject = linkLabel.Links[0].AccessibleObject; 273LinkAccessibleObject accessibleObject = linkLabel.Links[0].AccessibleObject;
System\Windows\Forms\AccessibleObjects\LinkLabel.LinkLabelAccessibleObjectTests.cs (8)
86linkLabel.Links.Add(new()); 108linkLabel.Links.Add(new()); 111LinkAccessibleObject expected = linkLabel.Links[childIndex].AccessibleObject; 127linkLabel.Links.Add(new()); 156linkLabel.Links.Add(new()); 159Assert.Equal(linkLabel.Links[0].AccessibleObject, accessibleObject.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild)); 171linkLabel.Links.Add(new()); 174Assert.Equal(linkLabel.Links[^1].AccessibleObject, accessibleObject.FragmentNavigate(NavigateDirection.NavigateDirection_LastChild));