MatchView.xaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <Page
  2. x:Class="YJMPD_UWP.Views.MatchView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:local="using:YJMPD_UWP.Views"
  6. xmlns:convert="using:YJMPD_UWP.Helpers.Converter"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. mc:Ignorable="d">
  10. <Page.Resources>
  11. <convert:BoolToVisibilityConverter x:Key="BoolToVisConverter" />
  12. </Page.Resources>
  13. <ScrollViewer>
  14. <StackPanel Style="{StaticResource Base}" >
  15. <StackPanel>
  16. <TextBlock Text="Start a match" Style="{StaticResource Header}" />
  17. <Button Content="Start match" Style="{StaticResource Green}" Click="StartMatchButton_Click" IsEnabled="{Binding MatchAvailable}" Visibility="{Binding StartMatch, Converter={StaticResource BoolToVisConverter}}" />
  18. <Button Content="Leave match" Style="{StaticResource Red}" Click="StopMatchButton_Click" Visibility="{Binding StopMatch, Converter={StaticResource BoolToVisConverter}}" />
  19. </StackPanel>
  20. <StackPanel Visibility="{Binding StopMatch, Converter={StaticResource BoolToVisConverter}}" Margin="0,10,0,0">
  21. <TextBlock Text="Current players in match" Style="{StaticResource Header}" />
  22. <TextBlock Text="{Binding PlayersCount}" />
  23. <ListView x:Name="PlayersList" ItemsSource="{Binding Players}" SelectionMode="None" IsTapEnabled="False">
  24. <ListView.ItemTemplate>
  25. <DataTemplate x:Name="ListViewDataTemplate">
  26. <StackPanel Orientation="Horizontal">
  27. <TextBlock Text="{Binding Username}" />
  28. </StackPanel>
  29. </DataTemplate>
  30. </ListView.ItemTemplate>
  31. </ListView>
  32. </StackPanel>
  33. </StackPanel>
  34. </ScrollViewer>
  35. </Page>