Megírtuk a random felelőválasztót WPF-ben.
XAML:
<Window x:Class="RandomSelectWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:RandomSelectWPF"
mc:Ignorable="d"
Title="Random felelő választó" Height="740" Width="600">
<Grid Background="#FFEADFDF" Margin="0,0,0,0">
<CheckBox x:Name="checkbox1csoport" Content="1. csoport" HorizontalAlignment="Left" Height="26" Margin="104,175,0,0" VerticalAlignment="Top" Width="138" Checked="checkbox1csoport_Checked" FontFamily="Arial Black" FontSize="20" Foreground="#FF1E4ADF" />
<CheckBox x:Name="checkbox2csoport" Content="2. csoport" HorizontalAlignment="Left" Height="26" Margin="362,175,0,0" VerticalAlignment="Top" Width="136" Checked="checkbox2csoport_Checked" FontFamily="Arial Black" FontSize="20" Foreground="#FF1E4ADF"/>
<ListBox x:Name="Listbox1csoport" HorizontalAlignment="Left" Height="457" Margin="60,228,0,0" VerticalAlignment="Top" Width="226" FontSize="16" Background="#FFDAC9C9" RenderTransformOrigin="0.5,0.5" />
<ListBox x:Name="Listbox2csoport" HorizontalAlignment="Left" Height="457" Margin="317,225,0,0" VerticalAlignment="Top" Width="225" FontSize="16" Background="#FFDAC9C9" Grid.ColumnSpan="2"/>
<Label x:Name="valasztottFelelo" Content="" HorizontalAlignment="Left" Height="34" Margin="286,102,0,0" VerticalAlignment="Top" Width="256" Background="#FFACCEEE" FontSize="16" FontFamily="Arial Black" Foreground="#FFF93B07" Grid.ColumnSpan="2"/>
<Button x:Name="felelo" Content="Következő felelő" HorizontalAlignment="Left" Margin="60,104,0,0" VerticalAlignment="Top" Height="30" Width="138" Click="felelo_Click" Background="#FF2F89DF" FontSize="16"/>
<Label x:Name="cim" Content="Random felelő választó" HorizontalAlignment="Left" Margin="143,35,0,0" VerticalAlignment="Top" FontSize="24" FontFamily="Arial Black" Foreground="#FF1E4ADF"/>
</Grid>
</Window>
Nincsenek megjegyzések:
Megjegyzés küldése