Have a trouble with binding to label content
I have special custom TabControl in page. Bind SelectedTab property from page viewmodel to controlview model to get actualSelectedTab
public int SelectedTab
{
get { return _selectedTab; }
set
{
SetProperty(ref _selectedTab, value);
}
}
For example, my tab control has 3 tabs; When tab one is selected - Selected Tab value is 0, etc.
But I need to show what current tab is selected in mainPage like 1/3 - 2/3 - 3/3
My final result must be like:
Selected Tab 1/3 ... 3/3
<Label
Margin="5 0 28 0"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
TextElement.FontSize="12"
TextElement.FontWeight="Bold"
TextElement.Foreground="White"
VerticalContentAlignment="Center"
Content="{Binding SelectedTab, Mode=OneWay}">
</Label>