Skip to content

Commit 48304e2

Browse files
committed
Add lost changes from the revert
This reverts commit ae415b9.
1 parent 86c234e commit 48304e2

File tree

103 files changed

+338
-441
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+338
-441
lines changed

_assetsApi/docfx-tmpl/src/styles/docfx.js

+55-46
Original file line numberDiff line numberDiff line change
@@ -434,60 +434,69 @@ $(function () {
434434
setSideNavPosition();
435435
}
436436

437+
var delayFunction;
437438
function registerTocEvents() {
438439
$('.toc .nav > li > .expand-stub').click(function (e) {
439440
$(e.target).parent().toggleClass(expanded);
440441
});
441442
$('.toc .nav > li > .expand-stub + a:not([href])').click(function (e) {
442443
$(e.target).parent().toggleClass(expanded);
443444
});
444-
$('#toc_filter_input').on('input', function (e) {
445-
var val = this.value;
446-
if (val === '') {
447-
// Clear 'filtered' class
448-
$('#toc li').removeClass(filtered).removeClass(hide);
449-
return;
450-
}
445+
451446

452-
// Get leaf nodes
453-
$('#toc li>a').filter(function (i, e) {
454-
return $(e).siblings().length === 0
455-
}).each(function (i, anchor) {
456-
var text = $(anchor).attr('title');
457-
var parent = $(anchor).parent();
458-
var parentNodes = parent.parents('ul>li');
459-
for (var i = 0; i < parentNodes.length; i++) {
460-
var parentText = $(parentNodes[i]).children('a').attr('title');
461-
if (parentText) text = parentText + '.' + text;
462-
};
463-
if (filterNavItem(text, val)) {
464-
parent.addClass(show);
465-
parent.removeClass(hide);
466-
} else {
467-
parent.addClass(hide);
468-
parent.removeClass(show);
469-
}
470-
});
471-
$('#toc li>a').filter(function (i, e) {
472-
return $(e).siblings().length > 0
473-
}).each(function (i, anchor) {
474-
var parent = $(anchor).parent();
475-
if (parent.find('li.show').length > 0) {
476-
parent.addClass(show);
477-
parent.addClass(filtered);
478-
parent.removeClass(hide);
479-
} else {
480-
parent.addClass(hide);
481-
parent.removeClass(show);
482-
parent.removeClass(filtered);
483-
}
484-
})
447+
function filterNavItem(name, text) {
448+
if (!text) return true;
449+
if (name && name.toLowerCase().indexOf(text.toLowerCase()) > -1) return true;
450+
return false;
451+
}
485452

486-
function filterNavItem(name, text) {
487-
if (!text) return true;
488-
if (name && name.toLowerCase().indexOf(text.toLowerCase()) > -1) return true;
489-
return false;
490-
}
453+
$('#toc_filter_input').on('input', function (e) {
454+
if (delayFunction) {
455+
clearTimeout(delayFunction);
456+
}
457+
458+
var val = this.value;
459+
delayFunction = setTimeout(function() {
460+
if (val === '') {
461+
// Clear 'filtered' class
462+
$('#toc li').removeClass(filtered).removeClass(hide);
463+
return;
464+
}
465+
466+
// Get leaf nodes
467+
$('#toc li>a').filter(function (i, e) {
468+
return $(e).siblings().length === 0;
469+
}).each(function (i, anchor) {
470+
var text = $(anchor).attr('title');
471+
var parent = $(anchor).parent();
472+
var parentNodes = parent.parents('ul>li');
473+
for (var i = 0; i < parentNodes.length; i++) {
474+
var parentText = $(parentNodes[i]).children('a').attr('title');
475+
if (parentText) text = parentText + '.' + text;
476+
}
477+
if (filterNavItem(text, val)) {
478+
parent.addClass(show);
479+
parent.removeClass(hide);
480+
} else {
481+
parent.addClass(hide);
482+
parent.removeClass(show);
483+
}
484+
});
485+
$('#toc li>a').filter(function (i, e) {
486+
return $(e).siblings().length > 0;
487+
}).each(function (i, anchor) {
488+
var parent = $(anchor).parent();
489+
if (parent.find('li.show').length > 0) {
490+
parent.addClass(show);
491+
parent.addClass(filtered);
492+
parent.removeClass(hide);
493+
} else {
494+
parent.addClass(hide);
495+
parent.removeClass(show);
496+
parent.removeClass(filtered);
497+
}
498+
});
499+
}, 500);
491500
});
492501
}
493502

@@ -1148,4 +1157,4 @@ $(function () {
11481157
$('a:not([data-tab])').click(delegateAnchors);
11491158
scrollToCurrent();
11501159
}
1151-
});
1160+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Add Context menu in the code
3+
page_title: Add Context menu in the code | RadContextMenu
4+
description: RadContextMenu is a non-visual component that sits in the component tray located below the form design surface.
5+
slug: winforms/menus/contextmenu/context-menus
6+
tags: context,menus
7+
published: True
8+
position: 4
9+
---
10+
11+
12+
# Add Context menu in the code
13+
14+
This article demonstrates how you can add RadContextMenu in the code and attach it to a specific control.
15+
16+
1\. Adding a RadContextMenu at runtime. To programmatically add a RadContextMenu to a form, create a new instance of a RadContextMenu
17+
18+
{{source=..\SamplesCS\Menus\ContextMenu\ContextMenuCode2.cs region=AddMenu}}
19+
{{source=..\SamplesVB\Menus\ContextMenu\ContextMenuCode2.vb region=AddMenu}}
20+
21+
22+
{{endregion}}
23+
24+
2\. Add RadMenuItems to RadContextMenu.
25+
26+
27+
{{source=..\SamplesCS\Menus\ContextMenu\ContextMenuCode2.cs region=AddItems}}
28+
{{source=..\SamplesVB\Menus\ContextMenu\ContextMenuCode2.vb region=AddItems}}
29+
30+
31+
32+
{{endregion}}
33+
34+
3\. Subscribe to МouseClick event of the control and call the RadContextMenu.Show() method:
35+
36+
37+
{{source=..\SamplesCS\Menus\ContextMenu\ContextMenuCode2.cs region=AttachToControl}}
38+
{{source=..\SamplesVB\Menus\ContextMenu\ContextMenuCode2.vb region=AttachToControl}}
39+
40+
41+
42+
{{endregion}}
43+
44+
4\. Here is the result:
45+
46+
![menus-context-menu-add-context-meni-in-code](images/menus-context-menu-add-context-meni-in-code001.png)
47+
48+
Loading

knowledge-base/converter-exception.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ res_type: kb
1515

1616
## Problem
1717

18-
The WinForms converter crashes when converting a project. This happens with Visual Studio 2017 18.7 or newer. This is caused because in the latest version of Visual Studio a type used in the converter was moved. Detailed information can be found here: [Version used in VS 15.8 not available on NuGet (Breaks VS extension using MSBuildWorkspace) Issue #29334](https://github.com/dotnet/roslyn/issues/29334)
18+
The WinForms converter crashes when converting a project. This happens with Visual Studio 2017 15.7 and newer. This is caused because in the latest version of Visual Studio a type used in the converter was moved. Detailed information can be found here: [Version used in VS 15.8 not available on NuGet (Breaks VS extension using MSBuildWorkspace) Issue #29334](https://github.com/dotnet/roslyn/issues/29334)
1919

2020
## Solution
2121

telerik-presentation-framework/layout/predefined-layout-panels/predefined-layout-panels.md

-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ Telerik UI for WinForms comes with a set of stock layout panels that handle most
2525
* __[BoxLayout]({%slug winforms/telerik-presentation-framework/layout/predefined-layout-panels/boxlayout%})__
2626

2727
* __[DockLayout]({%slug winforms/telerik-presentation-framework/layout/predefined-layout-panels/docklayout%})__
28-

telerik-presentation-framework/layout/radcontrol-testing-considerations.md

-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ When writing unit tests it's often convenient to use a RadControl, not as a chil
2929
* [Layout Structure]({%slug winforms/telerik-presentation-framework/layout/layout-structure%})
3030

3131
* [Sample Arrange Stage Scenarios]({%slug winforms/telerik-presentation-framework/layout/sample-arrange-stage-scenarios%})
32-

telerik-presentation-framework/layout/sample-arrange-stage-scenarios.md

-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ In the example below, the child DesiredSize is smaller than the rectangle alloca
2727

2828
>note The area of the child that falls outside of the rectangle allocated by the parent is not clipped, but is shown to the extent it is within the area of the parent. See [Clipping]({%slug winforms/telerik-presentation-framework/layout/clipping%}) for more information.
2929
>
30-
3130
## Parent Allocates Size Smaller than Requested Size
3231

3332
In the example below, the child DesiredSize is larger than the rectangle allocated by the parent.
@@ -50,4 +49,3 @@ In the example below, the child DesiredSize is larger than the rectangle allocat
5049
* [Layout Structure]({%slug winforms/telerik-presentation-framework/layout/layout-structure%})
5150

5251
* [RadControl Testing Considerations]({%slug winforms/telerik-presentation-framework/layout/radcontrol-testing-considerations%})
53-

telerik-presentation-framework/layout/sizing-properties.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Arrange allocates a cell in which the item child will be positioned. If the chil
1717

1818
* If the size of the child is smaller than the size of the cell, the child can be aligned within the cell
1919

20-
* If the size of the child is bigger than the size of the cell, the child is cut by the cell in accordance with the [clipping]({%slug winforms/telerik-presentation-framework/layout/clipping%}) behavior.
20+
* If the size of the child is bigger than the size of the cell, the child is cut by the cell in accordance with the [clipping]({%slug winforms/telerik-presentation-framework/layout/clipping%}) behavior.
2121

2222
If the child is stretchable, it fills to the maximum the dimension of the cell in the stretching direction. Furthermore, stretching is only applied in case of stretching up. There is no shrinking of element dimensions to make them fit in size less than the requested DesiredSize.
2323

@@ -26,9 +26,9 @@ If the child is stretchable, it fills to the maximum the dimension of the cell i
2626
* In case stretching in a particular direction is turned on, the child element will size itself to fill the size allocated to it by the parent, taking into account its margin and padding properties.
2727

2828
* In the case that a child is larger than its parent, the parent will only increase in size to accommodate the child in case all of the conditions below are fulfilled:
29-
1. Parent’s __AutoSize__ property is set to true.
30-
2. Parent’s __StretchHorizontally__ and __StretchVertically__ properties are set to *false*.
31-
3. Child’s __DesiredSize__ is non-zero.
29+
1. Parent’s __AutoSize__ property is set to true.
30+
2. Parent’s __StretchHorizontally__ and __StretchVertically__ properties are set to *false*.
31+
3. Child’s __DesiredSize__ is non-zero.
3232

3333
## ZIndex
3434

@@ -44,7 +44,6 @@ The desired size returned by the measure stage of the layout process can be igno
4444

4545
>caution When the __BypassLayoutPolicies__ flag is set to true, the transformation and constraint implementing logic is bypassed. Any transformation will therefore have to be implemented by the user.
4646
>
47-
4847
## FitToSizeMode
4948

5049
The RadElement __FitToSizeMode__ property controls the area that a child element may paint itself. By default all children are placed in the parent content area and can paint in that area only. __FitToSizeMode__ is taken into account when measuring and arranging elements during layout.
@@ -65,7 +64,7 @@ The __ConrolBoundingRectangle__ property stores the bounds of an element relativ
6564

6665
## DesiredSize
6766

68-
The __DesiredSize__ property is the size returned by the __MeasureOverride__ method of an element. It indicates how much space is needed by the children of the element to be ordered according to the logic implemented in the MeasureOverride method. The __DesiredSize__ is equal to the __BoundingRectangle.Size__.
67+
The __DesiredSize__ property is the size returned by the __MeasureOverride__ method of an element. It indicates how much space is needed by the children of the element to be ordered according to the logic implemented in the MeasureOverride method. The __DesiredSize__ is equal to the __BoundingRectangle.Size__.
6968

7069
# See Also
7170
* [Clipping]({%slug winforms/telerik-presentation-framework/layout/clipping%})
@@ -83,4 +82,3 @@ The __DesiredSize__ property is the size returned by the __MeasureOverride__ met
8382
* [Layout Structure]({%slug winforms/telerik-presentation-framework/layout/layout-structure%})
8483

8584
* [RadControl Testing Considerations]({%slug winforms/telerik-presentation-framework/layout/radcontrol-testing-considerations%})
86-

telerik-presentation-framework/microsoft-active-accessibility-support.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ Microsoft Active Accessibility is a COM-based technology that provides a standar
2020
MSAA it is also a great automation tool, which Microsoft included in Visual Studio 2010. The automation allows developers to access and manipulate all UI elements in applications that support it. However, at this point only the standard Windows Forms controls have support for this technology, and it is quite limited.
2121

2222
Telerik UI for WinForms allows you to create a simple coded UI test using MSAA in a few mouse clicks. An example is available [here]({%slug winforms/codedui/getting-started%}).
23-
23+
2424

2525
# See Also
2626

2727
* [Coded UI]({%slug winforms/codedui%})
2828

2929

30-

telerik-presentation-framework/mouse-effects.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ Since R1 2018 RadControls are supporting mouse effects. Each element that inheri
3737

3838
# See Also
3939

40-
* [Custom Fonts]({%slug winforms/tpf/custom-fonts%})
40+
* [Custom Fonts]({%slug winforms/tpf/custom-fonts%})

telerik-presentation-framework/overview/building-tpf-based-controls.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ previous_url: tpf-overview-building-tpf-controls
1111

1212
# Building TPF Based Controls
1313

14-
RadControls are built by composing RadElement trees instead of overriding the OnPaint method. [Elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) can take the form of lightweight [primitive elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) that draw the individual parts of a control to the form, [layout elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) that are responsible for arranging primitives on the form, and [component elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) that handle user input and are responsible for creating layout and primitive elements. Elements can be nested to any arbitrary level of complexity.
14+
RadControls are built by composing RadElement trees instead of overriding the OnPaint method. [Elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) can take the form of lightweight [primitive elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) that draw the individual parts of a control to the form, [layout elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) that are responsible for arranging primitives on the form, and [component elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) that handle user input and are responsible for creating layout and primitive elements. Elements can be nested to any arbitrary level of complexity.
1515

16-
* A number of pre-built [primitives]({%slug winforms/telerik-presentation-framework/primitives/overview%}) are available for building themable user interfaces quickly including [text]({%slug winforms/telerik-presentation-framework/primitives/textprimitive%}), [gradient fills]({%slug winforms/telerik-presentation-framework/primitives/fillprimitive%}), [borders]({%slug winforms/telerik-presentation-framework/primitives/borderprimitive%}), [checks]({%slug winforms/telerik-presentation-framework/primitives/checkprimitive%}), [arrows]({%slug winforms/telerik-presentation-framework/primitives/arrowprimitive%}), [lines]({%slug winforms/telerik-presentation-framework/primitives/lineprimitive%}), [radio buttons]({%slug winforms/telerik-presentation-framework/primitives/radioprimitive%}), [images]({%slug winforms/telerik-presentation-framework/primitives/imageprimitive%}) and [trackbars]({%slug winforms/telerik-presentation-framework/primitives/trackbarprimitive%}).  
16+
* A number of pre-built [primitives]({%slug winforms/telerik-presentation-framework/primitives/overview%}) are available for building themable user interfaces quickly including [text]({%slug winforms/telerik-presentation-framework/primitives/textprimitive%}), [gradient fills]({%slug winforms/telerik-presentation-framework/primitives/fillprimitive%}), [borders]({%slug winforms/telerik-presentation-framework/primitives/borderprimitive%}), [checks]({%slug winforms/telerik-presentation-framework/primitives/checkprimitive%}), [arrows]({%slug winforms/telerik-presentation-framework/primitives/arrowprimitive%}), [lines]({%slug winforms/telerik-presentation-framework/primitives/lineprimitive%}), [radio buttons]({%slug winforms/telerik-presentation-framework/primitives/radioprimitive%}), [images]({%slug winforms/telerik-presentation-framework/primitives/imageprimitive%}) and [trackbars]({%slug winforms/telerik-presentation-framework/primitives/trackbarprimitive%}).
1717

18-
* [Elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) combine primitives to form the basis of a functioning control. For example, RadLabelElement combines a [BorderPrimitive]({%slug winforms/telerik-presentation-framework/primitives/borderprimitive%}), [FillPrimitive]({%slug winforms/telerik-presentation-framework/primitives/fillprimitive%}) and [TextPrimitive]({%slug winforms/telerik-presentation-framework/primitives/textprimitive%}), then adds specific label properties __TextAlignment__ and __BorderVisible__.
18+
* [Elements]({%slug winforms/telerik-presentation-framework/elements/overview%}) combine primitives to form the basis of a functioning control. For example, RadLabelElement combines a [BorderPrimitive]({%slug winforms/telerik-presentation-framework/primitives/borderprimitive%}), [FillPrimitive]({%slug winforms/telerik-presentation-framework/primitives/fillprimitive%}) and [TextPrimitive]({%slug winforms/telerik-presentation-framework/primitives/textprimitive%}), then adds specific label properties __TextAlignment__ and __BorderVisible__.
1919

20-
* Layout elements descending from [LayoutPanel]({%slug winforms/telerik-presentation-framework/class-hierarchy/layoutpanel%}) manage the arrangement of child elements. For example, StackLayoutPanel arranges elements in a horizontal or vertical stack that may wrap to new lines. StripLayoutPanel orders elements in a single vertical or horizontal line. 
20+
* Layout elements descending from [LayoutPanel]({%slug winforms/telerik-presentation-framework/class-hierarchy/layoutpanel%}) manage the arrangement of child elements. For example, StackLayoutPanel arranges elements in a horizontal or vertical stack that may wrap to new lines. StripLayoutPanel orders elements in a single vertical or horizontal line.
2121

2222
* [RadControls]({%slug winforms/telerik-presentation-framework/class-hierarchy/radcontrol%}) are typically thin wrappers around a component element, handle any direct communication with Windows and establish communication to the RadElement tree by creating a root element and adding elements to the root element. RadLabel for example simply creates a root element and then creates and adds a RadLabelElement to the root element.
2323

2424

2525
# See Also
2626

2727
* [Telerik Presentation Framework Overview]({%slug winforms/telerik-presentation-framework/overview%})
28-
2928
* [Getting Started]({%slug winforms/telerik-presentation-framework/getting-started/getting-started%})

0 commit comments

Comments
 (0)