Procházet zdrojové kódy

feat: add comand in image-btn

ArrayKat2 před 4 měsíci
rodič
revize
2c27aa41a2
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      HelloItQuantum/Views/LabyrinthView.axaml

+ 4 - 4
HelloItQuantum/Views/LabyrinthView.axaml

@@ -57,25 +57,25 @@
 					Margin="0,25,0,30">
 					<StackPanel Orientation="Vertical" >
 						<StackPanel Orientation="Horizontal" VerticalAlignment="Top" >
-							<Button  Width="40" CornerRadius="10000" Padding="1" Margin="0,0,5,0">
+							<Button Command="{Binding LabyrinthVM.AddButton}" CommandParameter="left" Width="40" CornerRadius="10000" Padding="1" Margin="0,0,5,0">
 								<Image Source="/Assets/ImgLabyrinth/img_left.png"/>
 							</Button>
 							<Button Command="{Binding LabyrinthVM.AddButton}" CommandParameter="left" Width="150" FontSize="24" Background="#F26527">go left</Button>
 						</StackPanel>
 						<StackPanel Margin="0,10,0,0" Orientation="Horizontal" VerticalAlignment="Top" >
-							<Button Width="40" CornerRadius="10000" Padding="1" Margin="0,0,5,0">
+							<Button Command="{Binding LabyrinthVM.AddButton}" CommandParameter="right" Width="40" CornerRadius="10000" Padding="1" Margin="0,0,5,0">
 								<Image Source="/Assets/ImgLabyrinth/img_right.png"/>
 							</Button>
 							<Button Command="{Binding LabyrinthVM.AddButton}" CommandParameter="right" Width="150" FontSize="24" Background="#F26527">go right</Button>
 						</StackPanel>
 						<StackPanel Margin="0,10,0,0" Orientation="Horizontal" VerticalAlignment="Top" >
-							<Button Width="40" CornerRadius="10000" Padding="1" Margin="0,0,5,0">
+							<Button Command="{Binding LabyrinthVM.AddButton}" CommandParameter="up" Width="40" CornerRadius="10000" Padding="1" Margin="0,0,5,0">
 								<Image Source="/Assets/ImgLabyrinth/img_up.png"/>
 							</Button>
 							<Button Command="{Binding LabyrinthVM.AddButton}" CommandParameter="up" Width="150" FontSize="24" Background="#F26527">go up</Button>
 						</StackPanel>
 						<StackPanel Margin="0,10,0,0" Orientation="Horizontal" VerticalAlignment="Top" >
-							<Button Width="40" CornerRadius="10000" Padding="1" Margin="0,0,5,0">
+							<Button Command="{Binding LabyrinthVM.AddButton}" CommandParameter="down" Width="40" CornerRadius="10000" Padding="1" Margin="0,0,5,0">
 								<Image Source="/Assets/ImgLabyrinth/img_down.png"/>
 							</Button>
 							<Button Command="{Binding LabyrinthVM.AddButton}" CommandParameter="down" Width="150" FontSize="24" Background="#F26527">go down</Button>