Example #1
0
        public Group_Members()
        {
            GlobalVariables.connectToDatabase();
            InitializeComponent();
            List <string> memberNames = GlobalVariables.returnNamesGroup(GlobalVariables.selectedGroup);

            if (memberNames.Count > 6)
            {
                Members_Backbar.SetValue(Grid.RowSpanProperty, 6);
                Rectangle secondLayer = new Rectangle();
                secondLayer.SetValue(Grid.RowProperty, 1);
                secondLayer.SetValue(Grid.ColumnProperty, 3);
                secondLayer.SetValue(Grid.RowSpanProperty, memberNames.Count - 6);
                secondLayer.Fill = new SolidColorBrush(Colors.White);

                MainGrid.Children.Add(secondLayer);
                setNames(memberNames, 2, 6);
                setNames(memberNames, 3, memberNames.Count - 6);
            }
            else
            {
                Members_Backbar.SetValue(Grid.RowSpanProperty, memberNames.Count);
                setNames(memberNames, 2, memberNames.Count);
            }
        }