Relaycommands

This commit is contained in:
fabjuuuh
2020-10-14 15:19:43 +02:00
parent af5dca25f4
commit d8a3baeec1
4 changed files with 4 additions and 5 deletions

View File

@@ -8,6 +8,6 @@ namespace DoctorApp.ViewModels
class ClientInfoViewModel class ClientInfoViewModel
{ {
public string Username { get; set; } public string Username { get; set; }
public string TabName { get; set; } public string Status { get; set; }
} }
} }

View File

@@ -30,7 +30,6 @@ namespace DoctorApp.ViewModels
Tabs.Add(new ClientInfoViewModel Tabs.Add(new ClientInfoViewModel
{ {
Username = username, Username = username,
TabName = username
}); });
}); });
} }

View File

@@ -24,8 +24,8 @@
<Setter Property="Margin" Value="0,0,20,0"/> <Setter Property="Margin" Value="0,0,20,0"/>
</Style> </Style>
</StackPanel.Resources> </StackPanel.Resources>
<Label Content="UserName" Name="Username_Label"/> <Label Content="{Binding Username}"/>
<Label Content="Status: " Name="Status_Label"/> <Label Content="{Binding Status}"/>
</StackPanel> </StackPanel>
<StackPanel Margin="0,10,0,0" Grid.RowSpan="2" Grid.Row="1"> <StackPanel Margin="0,10,0,0" Grid.RowSpan="2" Grid.Row="1">
<StackPanel.Resources> <StackPanel.Resources>

View File

@@ -11,7 +11,7 @@
<TabControl TabStripPlacement="Left" ItemsSource="{Binding Tabs}" SelectedItem="{Binding Selected}"> <TabControl TabStripPlacement="Left" ItemsSource="{Binding Tabs}" SelectedItem="{Binding Selected}">
<TabControl.ItemTemplate> <TabControl.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding TabName}"/> <TextBlock Text="{Binding Username}"/>
</DataTemplate> </DataTemplate>
</TabControl.ItemTemplate> </TabControl.ItemTemplate>
<TabControl.ContentTemplate> <TabControl.ContentTemplate>