Пример #1
0
 public override void ReadXml(XmlReader reader)
 {
     if (reader.MoveToAttribute("Orientation"))
     {
         this.Orientation = (System.Windows.Controls.Orientation)Enum.Parse(typeof(System.Windows.Controls.Orientation), reader.Value, true);
     }
     base.ReadXml(reader);
 }
Пример #2
0
 internal LayoutGridControl(LayoutPositionableGroup <T> model, System.Windows.Controls.Orientation orientation)
 {
     if (model == null)
     {
         throw new ArgumentNullException("model");
     }
     this._model        = model;
     this._orientation  = orientation;
     base.FlowDirection = System.Windows.FlowDirection.LeftToRight;
 }
Пример #3
0
        /// <summary>
        /// Assigne à un StackPanel des propriétés graphiques basiques.
        /// </summary>
        /// <param name="_stp_dynamicsBase">StackPanel de base</param>
        /// <param name="_orientation">Orientation du Stackpanel</param>
        /// <returns>StackPanel : StackPanel pour les données de chaque intérimaire.</returns>
        private static StackPanel StackPanelBaseBuild(StackPanel _stp_dynamicsBase, Orientation _orientation = Orientation.Vertical)
        {
            // Assigne à un stackPanel de contrôles, pour les données de chaque intérimaire.
            StackPanel  stp_TemporaryData = new StackPanel();
            Orientation orientation       = _orientation;

            stp_TemporaryData.Width       = 1110;
            stp_TemporaryData.Height      = 36;
            stp_TemporaryData.Orientation = orientation;
            _stp_dynamicsBase.Children.Add(stp_TemporaryData);

            return(stp_TemporaryData);
        }
 /// <summary>
 /// split book into 4 part: topleft, bottomleft, topright, bottomright; and center
 /// </summary>
 /// <param name="size">booksize</param>
 /// <param name="FoldSize"></param>
 /// <param name="pos"></param>
 /// <param name="Orientation"></param>
 /// <returns></returns>
 public static BookZone GetZone(Size size, double FoldSize, Point pos,
                                System.Windows.Controls.Orientation Orientation)
 {
     //Size size = base.RenderSize;
     if (((pos.X < 0.0) || (pos.X > size.Width)) || ((pos.Y < 0.0) || (pos.Y > size.Height)))
     {
         return(BookZone.Out);
     }
     if (Orientation == System.Windows.Controls.Orientation.Horizontal)
     {
         if (pos.X > (size.Width - FoldSize))
         {
             if (pos.Y >= (size.Height / 2.0))
             {
                 return(BookZone.BottomRight);
             }
             return(BookZone.TopRight);
         }
         if (pos.X < FoldSize)
         {
             if (pos.Y >= (size.Height / 2.0))
             {
                 return(BookZone.BottomLeft);
             }
             return(BookZone.TopLeft);
         }
     }
     else
     {
         if (pos.Y > (size.Height - FoldSize))
         {
             if (pos.X >= (size.Width / 2.0))
             {
                 return(BookZone.BottomRight);
             }
             return(BookZone.BottomLeft);
         }
         if (pos.Y < FoldSize)
         {
             if (pos.X >= (size.Width / 2.0))
             {
                 return(BookZone.TopRight);
             }
             return(BookZone.TopLeft);
         }
     }
     return(BookZone.Center);
 }
Пример #5
0
 private static ScrollBar GetScrollbar(DependencyObject dep, Orientation orientation)
 {
     for (int i = 0; i < VisualTreeHelper.GetChildrenCount(dep); i++)
     {
         var child = VisualTreeHelper.GetChild(dep, i);
         var bar   = child as ScrollBar;
         if (bar != null && bar.Orientation == orientation)
         {
             return(bar);
         }
         else
         {
             ScrollBar scrollBar = GetScrollbar(child, orientation);
             if (scrollBar != null)
             {
                 return(scrollBar);
             }
         }
     }
     return(null);
 }
Пример #6
0
 public static ResizingPanel add_ResizingPanel(this DockingManager dockingManager, WPF.Orientation orientation)
 {
     return((ResizingPanel)dockingManager.wpfInvoke(
                () => {
         var resizingPanel = new ResizingPanel()
         {
             Orientation = orientation
         };
         dockingManager.Content = resizingPanel;
         return resizingPanel;
     }));
 }
 private static TStackPanel Orientation <TStackPanel>(this TStackPanel @this, O orientation)
     where TStackPanel : StackPanel
 {
     @this.Orientation = orientation;
     return(@this);
 }