예제 #1
0
        void napraviGridove(int i, int j, Tim p)
        {
            Rectangle r3 = new Rectangle();

            r3.Fill = new SolidColorBrush(Colors.RoyalBlue);
            Grid.SetColumn(r3, i);
            Grid.SetRow(r3, j);

            Rectangle r1 = new Rectangle();

            r1.Margin = new Thickness(0, 0, 0, 30);
            r1.Width  = 80;
            r1.Height = 80;
            ImageBrush imageBrush = new ImageBrush();
            string     putanja    = "ms-appx:///Assets/" + p.ikonica;

            imageBrush.ImageSource = new BitmapImage(new Uri(putanja, UriKind.RelativeOrAbsolute));
            r1.Fill = imageBrush;
            Grid.SetColumn(r1, i);
            Grid.SetRow(r1, j);
            r1.Tag = p.id_tim;

            Rectangle r2 = new Rectangle();

            r2.Fill              = new SolidColorBrush(Colors.Black);
            r2.Height            = 30;
            r2.Opacity           = 0.5;
            r2.VerticalAlignment = VerticalAlignment.Bottom;
            Grid.SetColumn(r2, i);
            Grid.SetRow(r2, j);

            TextBlock tb = new TextBlock();

            tb.Margin   = new Thickness(10, 135, 0, 0);
            tb.FontSize = 15;
            Grid.SetColumn(tb, i);
            Grid.SetRow(tb, j);
            tb.Text = p.ime;

            Rectangle r = new Rectangle();

            r.Fill    = new SolidColorBrush(Colors.Black);
            r.Opacity = 0;
            r.Width   = 160;
            r.Height  = 160;
            Grid.SetColumn(r, i);
            Grid.SetRow(r, j);
            r.Tag     = p.id_tim;
            r.Tapped += r_Tapped;

            gridTimovi.Children.Add(r3);
            gridTimovi.Children.Add(r1);
            gridTimovi.Children.Add(r2);
            gridTimovi.Children.Add(tb);
            gridTimovi.Children.Add(r);
        }
예제 #2
0
        void napraviGridove(int i, int j, Tim p)
        {
            Rectangle r3 = new Rectangle();
            r3.Fill = new SolidColorBrush(Colors.RoyalBlue);
            Grid.SetColumn(r3, i);
            Grid.SetRow(r3, j);

            Rectangle r1 = new Rectangle();
            r1.Margin = new Thickness(0, 0, 0, 30);
            r1.Width = 80;
            r1.Height = 80;
            ImageBrush imageBrush = new ImageBrush();
            string putanja = "ms-appx:///Assets/" + p.ikonica;
            imageBrush.ImageSource = new BitmapImage(new Uri(putanja, UriKind.RelativeOrAbsolute));
            r1.Fill = imageBrush;
            Grid.SetColumn(r1, i);
            Grid.SetRow(r1, j);
            r1.Tag = p.id_tim;

            Rectangle r2 = new Rectangle();
            r2.Fill = new SolidColorBrush(Colors.Black);
            r2.Height = 30;
            r2.Opacity = 0.5;
            r2.VerticalAlignment = VerticalAlignment.Bottom;
            Grid.SetColumn(r2, i);
            Grid.SetRow(r2, j);

            TextBlock tb = new TextBlock();
            tb.Margin = new Thickness(10, 135, 0, 0);
            tb.FontSize = 15;
            Grid.SetColumn(tb, i);
            Grid.SetRow(tb, j);
            tb.Text = p.ime;

            Rectangle r = new Rectangle();
            r.Fill = new SolidColorBrush(Colors.Black);
            r.Opacity = 0;
            r.Width = 160;
            r.Height = 160;
            Grid.SetColumn(r, i);
            Grid.SetRow(r, j);
            r.Tag = p.id_tim;
            r.Tapped += r_Tapped;

            gridTimovi.Children.Add(r3);
            gridTimovi.Children.Add(r1);
            gridTimovi.Children.Add(r2);
            gridTimovi.Children.Add(tb);
            gridTimovi.Children.Add(r);
        }