Example #1
0
        /// <summary>
        /// Создание линий подстраивающихся под размер окна с учетов их размера.
        /// </summary>
        public static void CreateLine(
            double SizeWindowHeight, double SizeWindowWidth, int SizePanelWidth, Grid grid, Color color)
        {
            Clear();
            GR = grid;
            int sw    = (int)SizeWindowWidth > 0? (int)SizeWindowWidth:1;
            int sp    = SizePanelWidth > 0? SizePanelWidth:1;
            int count = sw / sp;
            int size_ = (int)(SizeWindowWidth / count);

            //Debug.WriteLine($"Size:{size_} Count:{count}");
            for (int i = 0; i < count; i++)
            {
                WPFLine wPFLine = new WPFLine
                {
                    Height = SizeWindowHeight,
                    Width  = size_,
                    HorizontalAlignment = HorizontalAlignment.Left,
                    VerticalAlignment   = VerticalAlignment.Bottom,
                    SizeHeight          = 5,
                    ColorLine           = color
                };
                wPFLine.Margin = new Thickness(size_ * i, 0, 0, 2);
                grid.Children.Add(wPFLine);
                Lines.Add(wPFLine);
            }
        }
Example #2
0
 public double CalculateLineHeight(WPFLine wpfLine)
 {
     //todo: for each measure, calculate height of all measures then take max
     return(0d);
 }
 public double CalculateLineHeight(WPFLine wpfLine)
 {
     //todo: for each measure, calculate height of all measures then take max
     return 0d;
 }