Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions EmoTracker.Data/Layout/TabPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ public override ModelTypeBase Fork(ITrackerStateContext destOwnerState)
}
}

[KVOverridable]
public partial HorizontalAlignment TabStripHorizontalAlignment { get; set; }

protected override void PopulateDefinitionData(Newtonsoft.Json.Linq.JObject data, IGamePackage package, System.Collections.Generic.Dictionary<string, object> definition)
{
definition[nameof(TabStripHorizontalAlignment) + "__def"] = data.GetEnumValue<HorizontalAlignment>("tabstrip_h_alignment", HorizontalAlignment.Center);
}

ObservableCollection<Tab> mTabs = new ObservableCollection<Tab>();

public IEnumerable<Tab> Tabs
Expand Down
5 changes: 4 additions & 1 deletion EmoTracker/UI/LayoutControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,12 @@
<TabControl.Template>
<ControlTemplate>
<Grid RowDefinitions="Auto,*">
<!-- ZIndex="1" ensures the tab strip always renders above content
that overflows its row due to the global ClipToBounds=False style. -->
<ItemsPresenter Name="PART_ItemsPresenter"
Grid.Row="0"
HorizontalAlignment="Center"
ZIndex="1"
HorizontalAlignment="{Binding TabStripHorizontalAlignment, Converter={x:Static converters:TrivialEnumConverter.Instance}}"
Margin="0,3">
<ItemsPresenter.ItemsPanel>
<ItemsPanelTemplate>
Expand Down
Loading