Example #1
0
 void SlicerCtrl_DirectionChanged(object sender, ChangedDirectionEventArgs e)
 {
     if (e.Direction == Controls.Direction.Vertical)
     {
         this.SlicerWidth  = 1;
         this.SlicerHeight = CellsCount;
     }
     if (e.Direction == Controls.Direction.Horizontal)
     {
         this.SlicerHeight = 1;
         this.SlicerWidth  = CellsCount;
     }
     if (e.Direction == Controls.Direction.Both)
     {
         this.SlicerWidth = this.SlicerHeight = Math.Floor(Math.Sqrt(CellsCount));
     }
 }
 void SlicerCtrl_DirectionChanged(object sender, ChangedDirectionEventArgs e)
 {
     if (e.Direction == Controls.Direction.Vertical)
     {
         this.SlicerWidth = 1;
         this.SlicerHeight = CellsCount;
     }
     if (e.Direction ==Controls.Direction.Horizontal)
     {
         this.SlicerHeight = 1;
         this.SlicerWidth = CellsCount;
     }
     if (e.Direction ==Controls.Direction.Both)
     {
         this.SlicerWidth = this.SlicerHeight = Math.Floor(Math.Sqrt(CellsCount));                 
     }
 }