public void addTableItem(List <string> vals, List <double> ratios, int fontsize, List <Brush> colors, bool isbord)
 {
     try
     {
         if (items.Count < itemIndex + 1)
         {
             TabelItem item = new TabelItem();
             item.setProperty(vals.Count, colors, fontsize, isbord, ratios, 0);
             item.setText(vals);
             item.Margin = new Thickness(0, 5, 0, 10);
             table.Children.Add(item);
             items.Add(item);
         }
         else
         {
             items[itemIndex].setText(vals);
             items[itemIndex].Visibility = Visibility.Visible;
         }
         itemIndex++;
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString());
     }
 }
 public void setTopItem(List <string> vals, List <double> ratios, int fontsize, Brush color, bool isBord)
 {
     try
     {
         List <Brush> colors = new List <Brush>();
         for (int i = 0; i < vals.Count; i++)
         {
             colors.Add(color);
         }
         if (topItem == null)
         {
             topItem = new TabelItem();
         }
         topItem.setProperty(vals.Count, colors, fontsize, isBord, ratios, 0);
         topItem.setText(vals);
         TopItem.Child = topItem;
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString());
     }
 }