Browse Source

feat: add comand in image-btn

ArrayKat2 4 months ago
parent
commit
2c27aa41a2
1 changed files with 4 additions and 4 deletions
  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>