Exemple #1
0
    def buildLabels(self):
	for r in range(rows):
	    for c in range(cols):
		label = Label()
		label.Name = "and{0}and{1}".format(r,c)
		label.HorizontalAlignment = HorizontalAlignment.Center
		label.VerticalAlignment = VerticalAlignment.Center
		
		label.MouseLeftButtonUp += self.onClickTarget
		self.grid.Children.Add(label)
		
		Grid.SetRow(label, r)
		Grid.SetColumn(label, c)
		
		# Reset the path
		self.path = []
Exemple #2
0
 def getGrid(self):
    grid = Grid()
    grid.ShowGridLines = True
    
    # 3x3 grid
    for i in range(3):
       grid.ColumnDefinitions.Add(ColumnDefinition())
       grid.RowDefinitions.Add(RowDefinition())
    
    label = Label()
    label.Margin = Thickness(15)
    label.FontSize = 16
    label.Content = "Nothing Yet..."
    label.HorizontalAlignment = HorizontalAlignment.Center
    self.label = label
    
    grid.SetColumnSpan(self.label, 3)
    grid.SetRow(self.label, 0)
    grid.Children.Add(self.label)
    
    return grid