Avalonia - How to place the Tab control's tabs vertically like the OneNote Desktop UI - avaloniaui

I am new to Avalonia. In WPF, you can easily place the tab control's tabs vertically, demonstrated in below article
https://www.wpf-tutorial.com/tabcontrol/tab-positions/
How could I achieve similar things in Avalonia?

Just found out, identical to WPF, set the attribute TabStripPlacement to Left will do the trick, like below
<TabControl TabStripPlacement="Left">

Related

Why use XAML in visual studio express for windows 8?

i'm trying to do an application for Windows 8 and i'm following a guide on channel9.msdn
I cant understand why they use XAML to create textbox, label or other controls.
There's a reason ? There's a form which is much faster: simply drag & drop controls into the UI.
So why use XAML ?
Thanks all and sorry for my english :/
XAML supports laying out the form so that if you resize the window, the controls contained in the window are always consistently positioned according to the layout.
If you just drag and drop, you will see that the designers uses margins to position the controls. When you resize the window, they kind of keep the same position and are not going to be well positioned anymore.
This layouting is the essence of WPF. Just read a tutorial about layouting in WPF.
Drag and drop creation of UIs when using XAML creates very poorly formatted XAML and since there are a significant number of things which are most easily done in XAML (data templates for instance), it's easier to simply construct your UI in XAML from the start.

Is there a WrapPanel (not WrapGrid) control in WinRT-XAML?

A XAML StackPanel aligns controls side-by-side in a single direction. A WrapPanel is similar but like TextWrapping="Wrap" in a XAML TextBox the controls "wrap" to the next column or row when the respective height or width is reached.
Similar, but not the same, WrapGrid wraps content, but in a uniform grid. Though the VariableSizedWrapGrid allows for dissimilar items in the container. Neither of the WrapGrids can be used outside of an ItemsControl. So, they are disqualified.
When developers look in their native XAML Toolbox in Visual Studio there is no WrapPanel. WPF developers had a WrapPanel so they might be looking for this common tool to solve their scenario. So, I have to ask:
Does anyone know of a WrapPanel in XAML-WinRT? (what about one that is virtualized?)
There is one in WinRT XAML Toolkit here. It was ported from Silverlight Toolkit.
I had a same requirement and after googled it for a while, I've decided to use custom control for this. Please find following link for implementation:
http://www.codeproject.com/Articles/463860/WinRT-Custom-WrapPanel
Hope this will help you.

Animate TranslateTransform on GridViewItem

I have a series of items in a GridView.
I want to animate the TranslateTransform of a GridViewItem so that it is outside the boundary of the GridView. When I do, it is clipped. Is this type of transform possible?
Sadly, I don't think so. I had to do something similar a while ago and it turns out that the template of a GriView (and ListView, ListBox, etc...) contains a ScrollViewer control. The thing about the ScrollViewer controls is that they MUST define a clipped viewport to give the user the impression of scrolling. In fact, if you were to decompile the ScrollViewer control, you can see that it hard codes the clipped bounds, so you cant even change the template or style.
Things may have changed since I looked into this, and my investigations where on WPF not XAML in Windows 8, but I dont think that it would have changed based on your description of the issue.
Here is a SO question in relation to this topic: WPF clipping even when no clipping is desired - how to turn it off?

Is preparing Windows 8 XAML HubPages from several GridViews inside ScrollViewer the good approach?

I'd like to get the effect visible on the picture:
I don't think it is. A GridView already has a ScrollViewer in itself, so multiple of them does not make sense. I would try to use a single GridView with GroupStyleSelector/ItemContainerStyleSelector/ItemTemplateSelector implementations and DataTemplates to define each item. A less dynamic version might just be a ScrollViewer with Style set to HorizontalScrollViewerStyle, a horizontal StackPanel and a few VariableSizedWrapGrids - if you bind the GridView to some groups or other panels to define the content.
This looks like a good sample based on the description (though the images seem to be missing for me).

Hide objects/User Controls within WrapPanel?

I've got a WrapPanel which will contain several different custom UserControls. Depending on the scenario, I may need to filter down which UserControls are visible. My goal is that I can switch which controls are visible on the fly by showing/hiding the controls that need to be filtered - thus shifting the controls that are left showing, to the top-left of the panel.
Right now I am simply setting the Visibility property of the control to Visibility.Collapsed when I don't want them to appear. I thought that because I was using a WrapPanel, the rest of the controls would shift to the top-left of the panel.
Instead, after hiding some of the UserControls, the controls that are still visible stay exactly where they were before, and I am left with gaps between the controls that are still showing. I've opened my app in Silverlight Spy, and it shows that the UserControls are still actually there (which makes sense) but are simply invisible.
So my question is:
Is there a way that I can show/hide UserControls within a WrapPanel which allows the still-visible UserControls to slide to their new positions (all shifting towards the top left - similar to a StackPanel)?
I've debated removing the UserControls completely from the WrapPanel (I think this would work) and storing them in memory until they are needed. Then if I wanted to show/hide other controls, I would get them from my in-memory object. It seems like there should be a better way to do this though.
If anyone has any suggestions or advice, it would be greatly appreciated. Thanks!
-Lloyd
UPDATE:
XAML: (very simple)
<toolkit:WrapPanel x:Name="MyLayout" Height="300" HorizontalAlignment="Left" VerticalAlignment="Top" Width="400" />
Code-Behind: The UserControls are getting added dynamically:
MyLayout.Children.Add(oUserControl)
And they are getting set to collapsed dynamically as well:
oUserControl.Visibility = Visibility.Collapsed
I think I've found the problem. We added the WrapPanel to a ScrollViewer recently, and when I took the ScrollViewer out I was able to achieve the functionality I wanted.
I'm not sure why the ScrollViewer would have that effect though?
Also, I've found that I can leave the ScrollViewer in place and simply call .Measure() on the WrapPanel to update the layout.
Neither option makes 100% sense to me, but they do both seem to work.