Skip to content
Open
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
2 changes: 1 addition & 1 deletion UI/Navigation/src/Navigation/Models/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public Entity(string name)
{
Name = name;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
VerticalAlignment="Bottom"
uen:Region.Attached="True">
<utu:TabBar.Items>
<utu:TabBarItem Command="{Binding GoToFirstTabCommand}"
<utu:TabBarItem uen:Region.Name="TBDataOne"
uen:Navigation.Data="{Binding Entity}"
Content="One" />
<utu:TabBarItem Command="{Binding GoToSecondTabCommand}"
<utu:TabBarItem uen:Region.Name="TBDataTwo"
uen:Navigation.Data="{Binding Entity}"
Content="Two" />
</utu:TabBar.Items>
</utu:TabBar>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Navigation.Presentation;
namespace Navigation.Presentation;

public partial class TabBarWithDataViewModel
{
Expand All @@ -9,22 +9,7 @@ public TabBarWithDataViewModel(INavigator navigator)
_navigator = navigator;

Entity = new("TabBar Entity");

Initialize();
}

public Entity Entity { get; set; }

private async void Initialize()
{
await GoToFirstTab();
}

[RelayCommand]
private async Task GoToFirstTab()
=> await _navigator.NavigateRouteAsync(this, route: "TBDataOne", Qualifiers.Nested, data: Entity);

[RelayCommand]
private async Task GoToSecondTab()
=> await _navigator.NavigateRouteAsync(this, route: "TBDataTwo", qualifier: Qualifiers.Nested, data: Entity);
}
Loading