-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: It's not possible to edit/create KryptonContextMenu
's items using the designer on .NET
#2100
Comments
Q: Why is the workaround not practical? It's only for the designer, not for the binary builds. |
Unless I misunderstood the workaround, it's basically just adding a .NET Framework version to the target frameworks, which prevents you from referencing any packages that are not supported by .NET Framework, right? Or did I miss something about how to apply the workaround? |
Correct.
It will prevent them from resolving when attempting to build, but not from being added to the project. And in CI (Dev-Ops) just set the build target in the option being passed to the build command |
I'll update the docs with this info |
Sorry, I'm not sure I follow. Say, I have a simple project with the package List<int> list = new();
string path = Path.Join(@"C:\", "Windows");
int[] arr = [1, 2, 3]; Is there a way to target .NET Framework to use the designer for Krypton controls while being able to build and test the project? As soon as I replace Here's a sample project to demonstrate this: What am I missing? |
Hi @ICloneableX Have you tried #if NET8_0_OR_GREATER
List<int> list = new();
string path = Path.Join(@"C:\", "Windows");
int[] arr = [1, 2, 3];
#endif This way, that code block will only work/compile for >= .NET 8 Also, you can try something like: <ItemGroup Condition="'$(TargetFramework)' == 'net8.0-windows'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Krypton.Navigator" Version="90.24.11.317" />
</ItemGroup> |
Unfortunately, none of that is practical except for very simple projects. Please don't get me wrong. I know that this isn't your fault and that most of it is on Microsoft and its new designer that's causing a lot of issues. I do appreciate all the great work that you guys are doing. For now, I have some workarounds that I use to mitigate some of these issues. They're still quite annoying. Haha! But they're at least more practical in real-life scenarios. Here are some examples off the top of my head:
|
Describe the bug
After adding a
KryptonContextMenu
to the form, it's not possible to make changes to its items through the designer if you're using .NET (it works on .NET Framework).To Reproduce
KryptonContextMenu
to the form.Items
property.Screenshots
On .NET Framework, the button is there and clicking it opens the Items editor normally:
Desktop:
Additional context
I understand that this might be related to the designer issues with .NET and that there is a proposed workaround but...
a. That workaround is not really practical.
b. The other issues you can sort of get around them but this one makes using
KryptonContextMenu
impossible.d. I don't fully understand the root cause behind these designer issues but if I'm not mistaken, this one should work because other editors (like the KryptonPage Collection Editor, for example) work fine. Unless I'm missing something that makes it different.
The text was updated successfully, but these errors were encountered: