HI,
Exploring the Demo Winforms FilterView component a bug is present.
When you expand several categories ,the automatic Vertical Scroll bar is showed but the "Maximum" property value is wrong.
You can't see all the items inside. Some items are hidden at bottom.
But if you collapse some category the new "Maximum" values takes the right previous value before collapsing showing more space as expected
I have a workaround to prevent this situation calling CategoryExpandedChanged event.
Firstly I need to call Application.DoEvents() in order to resizing internally by the component all the StackLayoutPanels connaining the Category Items
After that, I call the private method UpdateScrollBars (Suggested by support) and the ScrollBar takes the right size for its content.
Now I can show all the contained items inside the FilterView panel.
FRC
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
public RadForm1()
{
InitializeComponent();
DataTable dt = new DataTable();
for (int i = 0; i < 20; i++)
{
dt.Columns.Add("col" + i, typeof(string));
}
for (int i = 0; i < 10; i++)
{
DataRow r = dt.NewRow();
foreach (DataColumn col in dt.Columns)
{
r[col.ColumnName] = Guid.NewGuid().ToString();
}
dt.Rows.Add(r);
}
this.radFilterView1.DataSource = dt;
}
private void radFilterView1_CategoryCreated(object sender, Telerik.WinControls.UI.FilterView.FilterViewCategoryCreatedEventArgs e)
{
e.Category.ExpandedChanged += Category_ExpandedChanged;
e.Category.Expanded = false;
}
private void Category_ExpandedChanged(object? sender, EventArgs e)
{
// You need pass the control to Windows main loop to perform the pending telerik events after property Expanded change in order to resize internally
// the StackLayoutPanel Containers before calling UpdateScrollBars
Application.DoEvents();
// Now your code
MethodInfo mi = typeof(RadFilterViewElement).GetMethod("UpdateScrollbars", BindingFlags.Instance | BindingFlags.NonPublic);
mi.Invoke(this.radFilterView1.FilterViewElement, new object[] { this.radFilterView1.FilterViewElement.ElementsPanel.Size });
// Hide the horizontal scrolll bar
radFilterView1.FilterViewElement.HorizontalScrollBar.Visibility =ElementVisibility.Collapsed;
}
}
Use a custom font set like this:
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontFamily = new Telerik.WinControls.SyntaxEditor.UI.FontFamily("Cascadia Code");
this.radSyntaxEditor1.SyntaxEditorElement.EditorFontSize = 13;
Then load a large document, at least 10K lines so that the clipping is visible.
The solution in this KB article is used: https://docs.telerik.com/devtools/winforms/knowledge-base/clickonce-application-is-broken
Follow the steps:
1. Set your main monitor to be with higher than 100% DPI scaling (e.g. 175%, 200%)
2. Set the secondary monitor with 100% DPI scaling.
3. Run the exe from the project on the secondary monitor with 100% DPI scaling. You will notice that all controls that host the standard MS TextBox are incorrectly scaled:
Setting the SyntaxEditorElement.HorizontalScrollBar.Visibility property to Collapsed indeed hides the horizontal scrollbar but it is still measured and arranged and overlaps the view if you shrink the view:
So, at this point this seems to be a possible bug. The template project did not setup correctly. I have literally done nothing other than download and install Telerik WinForms today and then try to create this project. This _should_ work or give me instructions of further setup that I have to do manually.
I did try a couple other things, but also failed to get things working.
Restoring packages for C:\DevGit\pws\pws.core\pws.core\pws.core.csproj...
GET https://nuget.telerik.com/v3/package/ui.for.winforms.allcontrols.net60/index.json
GET https://nuget.org/FindPackagesById()?id='UI.for.WinForms.AllControls.Net60'&semVerLevel=2.0.0
OK https://nuget.telerik.com/v3/package/ui.for.winforms.allcontrols.net60/index.json 90ms
GET https://nuget.telerik.com/v3/package/ui.for.winforms.allcontrols.net60/2022.1.222/ui.for.winforms.allcontrols.net60.2022.1.222.nupkg
NotFound https://nuget.org/FindPackagesById()?id='UI.for.WinForms.AllControls.Net60'&semVerLevel=2.0.0 147ms
GET https://nuget.org/FindPackagesById()?id='UI.for.WinForms.AllControls.Net60'&semVerLevel=2.0.0
NotFound https://nuget.org/FindPackagesById()?id='UI.for.WinForms.AllControls.Net60'&semVerLevel=2.0.0 42ms
GET https://nuget.org/FindPackagesById()?id='UI.for.WinForms.AllControls.Net60'&semVerLevel=2.0.0
NotFound https://nuget.org/FindPackagesById()?id='UI.for.WinForms.AllControls.Net60'&semVerLevel=2.0.0 40ms
OK https://nuget.telerik.com/v3/package/ui.for.winforms.allcontrols.net60/2022.1.222/ui.for.winforms.allcontrols.net60.2022.1.222.nupkg 235ms
GET https://nuget.telerik.com/v3/package/system.management/index.json
GET https://nuget.org/FindPackagesById()?id='System.Management'&semVerLevel=2.0.0
....
followed by many more "NotFound" messages.
How to reproduce:
Add a webcam control to the form and set its ControlPanelHeight property. Close the designer and try to open it. Visual Studio crashes and closes.
While working with the Ribbon in a RadRibbonForm, I inadvertently removed a ribbon tab. I started recreating the ribbon tab I removed (and all of the child objects). When I got to creating and naming a ribbon button, it notified me that a control with that name already existed. It appeared that child objects, of the ribbon tab I removed, had not been removed from the form.
I tried to select the existing control from the pull-down on the top of the properties window (to find a way to remove it) and Visual Studio 2022 crashed to desktop. I hadn't saved the form I was working on, so it's mostly messed up in the project (the UI is missing), and I will have to delete what is there and start over.
The following code to make the headers bold in a RadGridView. After upgrading to different 2022 versions from 2021, this code causes a Parameter is not valid error in ((System.ComponentModel.ISupportInitialize)(this.RadGridView1.MasterTemplate)).EndInit();
If I comment out the code and run then there is no error generated.
void
radGridView1_ViewCellFormatting(
object
sender, CellFormattingEventArgs e)
{
if
(e.CellElement
is
GridHeaderCellElement)
{
e.CellElement.Font = myCustomFont;
}
}
When saving the layout of RadDock with SaveToXml, the scaled value of SplitterWidth is saved in high DPI.
The non-scaled value should be saved.
The Telerik UI for WinForms installation puts a system assembly into the GAC folder which breaks a third-party tool that depends on the same assembly.
System.Reflection.TargetInvocationException:“Exception has been thrown by the target of an invocation.”
XamlParseException: “类型“Telerik.WinForms.Documents.Model.RadDocument”不具有内容属性。指定要设置的属性的名称,或者在该类型上添加 ContentPropertyAttribute 或 TypeConverterAttribute。”,行号为“5”,行位置为“4”。
System.Reflection.TargetInvocationException:“调用的目标已抛出异常。”
XamlParseException: “类型“Telerik.WinForms.Documents.Model.RadDocument”不包含内容。指定要设置的属性的名称,或者在该类型上添加 ContentPropertyAttribute 或 TypeConverterAttribute。”,行号为“5”,行位置为“4”。
1. Target Framework .NET6 and VS 2022 17.0.1:
2. Install UI.for.WinForms.AllControls.Net60 version 2021.3.1123:
3. Double click the form to open the designer:
4. First try dragging a RadGridView from the toolbox:
5. Install the Nuget package for the toast notification:
6. Install Microsoft.Toolkit.Uwp.Notifications version 7.0.0:
Please make sure that the C:\Program Files (x86)\Progress\ToolboxNuGetPackages folder doesn't contain anything and it is empty. If there is any version available there, please delete it.
7. Now, try opening the designer. It never loads: