Is there an analog QStackedWidget (Qt) in C # (.Net)?
1 answer
Instead:
addWidget(new QLabel("Page 1", this)); addWidget(new QLabel("Page 2", this)); addWidget(new QLabel("Page 3", this)); You can use "Notebook" tabs, they are also TabItem's:
ListBox notesList = new ListBox(); notesList.Items.Add("Элемент контента 1"); notesList.Items.Add("Элемент контента 2"); notesList.Items.Add("Элемент контента 3"); TabControl products = new TabControl(); products.Items.Add(new TabItem { Header = new TextBlock { Text = "Page 1" }, Content = notesList}); products.Items.Add(new TabItem { Header = new TextBlock { Text = "Page 2" }, Content = notesList}); products.Items.Add(new TabItem { Header = new TextBlock { Text = "Page 3" }, Content = notesList}); products.Alignment = TabAlignment.Right; If you want to learn more, a good tutorial: http://metanit.com/sharp/wpf
Try it, here is a slightly different approach. Identical functionality, alas, no.
QthasQTabWidget- the equivalent ofTabControl. I think the answer can be complemented by how to achieve the desired behavior. - user227049- Yes, sorry for everything to work you need to add. TabControl products = new TabControl (); ... products.Alignment = TabAlignment.Right; And you will be happy. Similarly, you can set a fixed length of the buttons, twist them, etc. Appearance and other useful properties will help you here. - Nikita Fedorov
|
QStackedWidgetlook like? Can attach a screenshot? - Dmitry D.QStackedWidgetthen there is no suchWpfinWpf. - user227049