Comments 7
First of all — nice work!
There is also another package for MessageBox — StarDebris.Avalonia.MessageBox:
Although this one is a bit outdated. I thought to use it in my personal project but after all I've rejected to go this way and wrote code that fitted my requirement by myself.
If you don't mind I ask some questions:
- Why have you avoided of using xaml?
- Why is repo on gitlab? (Github is much, much more popular)
- Somewhere code is really looks odd, for example:
var messageBox = CreateWindow(title, text, buttons, windowSize, bitmap);
var tcs = new TaskCompletionSource<MessageBoxResult>();
messageBox.Title = title;
messageBox.WindowStartupLocation = WindowStartupLocation.CenterScreen;
messageBox.Closed += delegate { tcs.TrySetResult(messageBox.Res); };
definitely not cleanest API.
You pass title to the CreateWindow but ignore this parameter at all there. And so on.
1) about xaml, it was my research and i never create nuget package before. Now I wanna (in proccees) rebuild (redisine) all with using styles, xaml, and users controls
2) I start working with gitlab, because some years ago githab has no private repos, okey mb i move here
3) about api, ty, i'll improve article
1) about xaml, it was my research and i never create nuget package before.
To be honest I don't see how it's related. Good luck, anyway.
Although if you interested in additional research I suggest you try to implement it with F#.
It seems to me that the Windows Message box contains excess buttons minimize
and maximize
. Is it possible to get rid of them?
I've developed the similar control inside another project, but maybe your code is better and has more features.
MessageBox for AvaloniaUI