Ejemplo n.º 1
0
 private List<double> AddLabelToSlider(RegionData regionVal, List<double> translates)
 {
     TranslateTransform tt = new TranslateTransform();
     tt.X = ((int)regionVal.Get(_isValue)) / _currentMaxRegionValue * PageSlider.ActualWidth;
     foreach (double i in translates)
     {
         if (tt.X < (i + 13) && tt.X > (i - 13))
             return translates;
     }
     translates.Add(tt.X);
     RotateTransform categoryRT = new RotateTransform();
     categoryRT.Angle = 60;
     TransformGroup categoryTG = new TransformGroup();
     categoryTG.Children.Add(categoryRT);
     categoryTG.Children.Add(tt);
     RotateTransform salesOutRT = new RotateTransform();
     salesOutRT.Angle = 300;
     TransformGroup salesOutTG = new TransformGroup();
     salesOutTG.Children.Add(salesOutRT);
     salesOutTG.Children.Add(tt);
     LabelsGrd.Children.Add(new TextBlock() { Text = regionVal.RegionName, RenderTransform = categoryTG, Margin = new Thickness(0, 0, 0, 10) });
     SalesOutGrd.Children.Add(new TextBlock() { Text = Utils.NumberToString((int)regionVal.Get(_isValue)) + "", RenderTransform = salesOutTG, VerticalAlignment = System.Windows.VerticalAlignment.Bottom, Margin = new Thickness(-10, 0, 0, -10) });
     return translates;
 }
Ejemplo n.º 2
0
 private void SetMaximumText(RegionData maximumRegionValue)
 {
     if (BottomLabel_Stack != null)
     {
         BottomLabel_Stack.Visibility = System.Windows.Visibility.Visible;
         BottomLabel1_Top.Text = maximumRegionValue.RegionName;
         BottomLabel2_Bottom.Text = Utils.NumberToString((int)maximumRegionValue.Get(_isValue));
     }
 }