02.06.2025 22:13 Gtk4
Приклад використання віджету Video - Відео

dotnet new consoledotnet add package GirCore.Gtk-4.0dotnet runusing Gtk;
class Program
{
static void Main()
{
var app = Application.New("ua.org.accounting.test", Gio.ApplicationFlags.FlagsNone);
app.OnActivate += (sender, args) =>
{
FirstWindow firstWindow = new(app);
firstWindow.Show();
};
app.RunWithSynchronizationContext(null);
}
}
using Gtk;
using static Gtk.Orientation;
class FirstWindow : Window
{
public FirstWindow(Application app) : base()
{
Application = app;
Title = "Video";
SetDefaultSize(500, 300);
Video video = Video.NewForFilename("/home/user_name/1.mp4");
video.Autoplay = true;
Child = video;
}
}© accounting.org.ua - 2025