Example #1
0
 public FixedStackLayout(IOCPanel panel, IItemGeneratorHelper generator)
 {
     _panel          = panel;
     _generator      = generator;
     _desiredSizeDic = new ConcurrentDictionary <int, Size>();
     Extent          = Size.Empty;
 }
 public HalfVariableWrapLayout(IOCPanel panel, IItemGeneratorHelper generator)
 {
     _panel              = panel;
     _generator          = generator;
     _lineSizeDictionary = new ConcurrentDictionary <int, double>();
     Extent              = Size.Empty;
 }
Example #3
0
 public PanelScrollHelper(IOCPanel panel, ScrollViewer scrollOwner)
 {
     _panel = panel;
     _panel.RenderTransform = _trans = new TranslateTransform(); // For use in the IScrollInfo implementation
     _extent   = Size.Empty;
     _viewport = Size.Empty;
     _owner    = scrollOwner;
     _offset   = new Point(0, 0);
 }
Example #4
0
        private static void OnResetLayout(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            IOCPanel panel = d as IOCPanel;

            if (panel.Layout != null)
            {
                panel.Layout.ResetLayout();
            }
            panel.resetScrollOffset();
        }
Example #5
0
        private static void OnModeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            IOCPanel panel = d as IOCPanel;

            if (panel.IsInitialized)
            {
                //panel.RemoveInternalChildRange(0, panel.getInternalChildren().Count);
                foreach (var child in panel.Children)
                {
                    (child as FrameworkElement).InvalidateMeasure();
                }
                panel.Layout = panel.getLayout();
                panel.resetScrollOffset();
            }
        }
Example #6
0
        /// <summary>
        /// Add and subtract CacheItemCount to StartIdx and EndIdx.
        /// </summary>
        /// <param name="panel"></param>
        /// <param name="startIdx"></param>
        /// <param name="endIdx"></param>
        public static void UpdateCacheItemCount(this IOCPanel panel,
                                                ref int startIdx, ref int endIdx)
        {
            //Add and subtract CacheItemCount to StartIdx and EndIdx.
            int itemCount = panel.getItemCount();

            startIdx -= panel.CacheItemCount;
            endIdx   += panel.CacheItemCount;
            if (startIdx < 0)
            {
                startIdx = 0;
            }
            if (endIdx > itemCount - 1)
            {
                endIdx = itemCount - 1;
            }
        }
Example #7
0
 public NullScrollHelper(IOCPanel panel)
 {
     Extent = ViewPort = Size.Empty;
 }
 public FixedWrapLayout(IOCPanel panel, IItemGeneratorHelper generator)
 {
     _panel     = panel;
     _generator = generator;
     Extent     = Size.Empty;
 }
 public VirtualItemGenerator(IOCPanel panel)
 {
     _panel = panel;
 }