Mtax
Mtax
CC#
Created by Mtax on 1/19/2024 in #help
How to request file access permission on macOS?
In a context of an empty project of a console application published to osx-x64 Target Runtime, calling Directory.Exists() for a file in user's Library will always return false, unless the application is ran through sudo. Is there a way to request a file request permission on macOS during the runtime?
1 replies
CC#
Created by Mtax on 1/10/2024 in #help
Syntax: Using a delegate with simplified collection declaration
Working with Avalonia framework, attempting to use simplified collection declaration, however it does not seem to support setting up events that way. Is there a workaround? It would be a significant help in preventing menu/item declaration from becoming a spaghetti.
a.Menu =
[
new NativeMenuItem("Top Menu")
{
Menu =
[
new NativeMenuItem("Nested Item")
{
Click += delegate { }
}
]
}
];
a.Menu =
[
new NativeMenuItem("Top Menu")
{
Menu =
[
new NativeMenuItem("Nested Item")
{
Click += delegate { }
}
]
}
];
17 replies