当前位置: 首页>>代码示例>>C#>>正文


C# Windows.SizeChangedInfo类代码示例

本文整理汇总了C#中System.Windows.SizeChangedInfo的典型用法代码示例。如果您正苦于以下问题:C# SizeChangedInfo类的具体用法?C# SizeChangedInfo怎么用?C# SizeChangedInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SizeChangedInfo类属于System.Windows命名空间,在下文中一共展示了SizeChangedInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            RemoveBackBufferReference();
            _contentNeedsRefresh = true;

            base.OnRenderSizeChanged(sizeInfo);
        }
开发者ID:4ux-nbIx,项目名称:gemini,代码行数:7,代码来源:DrawingSurface.cs

示例2: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);

            Canvas.SetTop(checkBox, (sizeInfo.NewSize.Height / 2) - (checkBox.Height / 2));
            Canvas.SetLeft(checkBox, (sizeInfo.NewSize.Width / 2) - (checkBox.Width / 2));
        }
开发者ID:iKenndac,项目名称:KNControlsWPF,代码行数:7,代码来源:KNCheckboxCell.cs

示例3: OnRenderSizeChanged

 protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
 {
     base.OnRenderSizeChanged(sizeInfo);
     Size sz = MeasureString("X");
     this._maximumLines = (int)(this.ActualHeight / sz.Height);
     this.LineHeight = sz.Height;
 }
开发者ID:Dr1N,项目名称:Whiteboard,代码行数:7,代码来源:BoardTextBox.cs

示例4: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            if (this.Model == null) return;

            this.Model.BarLength = progress.ActualWidth;
            base.OnRenderSizeChanged(sizeInfo);
        }
开发者ID:jrc60752,项目名称:iRacingAdminSync,代码行数:7,代码来源:ReplayBarView.xaml.cs

示例5: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);

            //InvalidateArrange();
            //LayoutChildren();
        }
开发者ID:sohong,项目名称:greenfleet-viewer,代码行数:7,代码来源:HelloBox.cs

示例6: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);

            AcHeight = ActualHeight;
            AcWidth = ActualWidth;
        }
开发者ID:heyixiaoran,项目名称:BoardClient,代码行数:7,代码来源:WidgetListView.cs

示例7: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);

            if (!this.kinectManager.KinectSensor.IsAvailable)
            {
                if (!backgroundInitialized)
                {
                    /*
                    backgroundInitialized = true;
                    BitmapSource source = ImageExtensions.ToBitmapSource(KinectShowcase.Properties.Resources.background);
                    // Calculate stride of source
                    int stride = source.PixelWidth * (source.Format.BitsPerPixel / 8);
                    // Create data array to hold source pixel data
                    byte[] data = new byte[stride * source.PixelHeight];
                    // Copy source image pixels to the data array
                    source.CopyPixels(data, stride, 0);
                    // Create WriteableBitmap to copy the pixel data to.
                    WriteableBitmap target = new WriteableBitmap(source.PixelWidth, source.PixelHeight, source.DpiX, source.DpiY, source.Format, null);
                    // Write the pixel data to the WriteableBitmap.
                    target.WritePixels(new Int32Rect(0, 0, source.PixelWidth, source.PixelHeight), data, stride, 0);
                    skeletonView.Source = target;
                    skeletonView.Update();
                     * */
                }
            }
            else
            {
                skeletonView.Update();
            }
            ViewModelLocator.Locator().ApplicationViewModel.SkeletonView.SetKinectManager(this.kinectManager);
        }
开发者ID:Dig-Doug,项目名称:BU_KinectShowcase,代码行数:32,代码来源:MainWindow.xaml.cs

示例8: OnRenderSizeChanged

 protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
 {
     if(sizeInfo.NewSize.Width > 0)
     {
         base.OnRenderSizeChanged(sizeInfo);
     }
 }
开发者ID:WinstonSmith77,项目名称:Clock,代码行数:7,代码来源:MainWindow.xaml.cs

示例9: OnRenderSizeChanged

		protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
		{
			if (_standardHeight == 0)
				_standardHeight = sizeInfo.NewSize.Height;

			base.OnRenderSizeChanged(sizeInfo);
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:7,代码来源:ImageComboBox.cs

示例10: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            // If we don't do this, HwndHost doesn't seem to pick up on all size changes.
            UpdateWindowPos();

            base.OnRenderSizeChanged(sizeInfo);
        }
开发者ID:DraTeots,项目名称:gemini,代码行数:7,代码来源:ClippingHwndHost.cs

示例11: OnRenderSizeChanged

        /// <summary>
        /// Adjust the top and bottom gloss rectangles to fit the new geometry of the control.
        /// </summary>
        /// <param name="sizeInfo">The new geometry information.</param>
        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);

            double height = sizeInfo.NewSize.Height;
            double width = sizeInfo.NewSize.Width;

            // topGloss should be half the height of the container
            topGloss.Height = height / 2;
            topGloss.Width = width;

            // bottomGloss should be 40% of the height of the container and
            // its top set at the 40% Y value of the height of the container
            Thickness margin = new Thickness();
            margin.Left = bottomGloss.Margin.Left;
            margin.Top = height * 0.35;
            margin.Right = bottomGloss.Margin.Right;
            margin.Bottom = bottomGloss.Margin.Bottom;

            bottomGloss.Height = height * 0.45;
            bottomGloss.Width = width;
            bottomGloss.Margin = margin;

            // clip off the top rounded corners
            bottomGloss.Clip = new RectangleGeometry(
                new Rect(0, 3, bottomGloss.Width, bottomGloss.Height - 3));
        }
开发者ID:pengyancai,项目名称:cs-util,代码行数:31,代码来源:DetailPanel.cs

示例12: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            base.OnRenderSizeChanged(sizeInfo);

            ResetTransformOrigin();
            UpdateTransform();
        }
开发者ID:huoxudong125,项目名称:XamlMapControl,代码行数:7,代码来源:MapBase.WPF.cs

示例13: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            if (ItemsSource == null || ItemsSource.Count == 0 || ScrollViewer == null) return;

            var screenTopRowIndex = GetScreenTopRowIndex();
            var count = GetDesiredDisplayCount();

            if (ItemsSource.Count <= (screenTopRowIndex + count) && sizeInfo.PreviousSize.Height < sizeInfo.NewSize.Height)
            {
                var gap = sizeInfo.NewSize.Height - sizeInfo.PreviousSize.Height;
                if (gap < RowHeight)
                {
                    if (sizeInfo.PreviousSize.Height < RowHeight)
                        ScrollViewer.ScrollToEnd();
                }
                else
                {
                   //以下2行位查明意图
                   //xvar offset = gap / RowHeight * ScrollViewer.ExtentHeight / ItemsSource.Count;
                   //xScrollViewer.ScrollToVerticalOffset(ScrollViewer.VerticalOffset - offset);
                    Refresh(false);
                }
            }
            else
                Refresh(false);

            base.OnRenderSizeChanged(sizeInfo);
        }
开发者ID:Mrding,项目名称:Ribbon,代码行数:28,代码来源:ElementListBox.cs

示例14: OnRenderSizeChanged

        protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
        {
            if (this.Model == null) return;

            this.Model.LineWidth = (float)this.ActualWidth - 10f;
            this.Model.TrackWidth = (float)this.ActualWidth;
            base.OnRenderSizeChanged(sizeInfo);
        }
开发者ID:jrc60752,项目名称:iRacingAdminSync,代码行数:8,代码来源:TrackBarView.xaml.cs

示例15: OnRenderSizeChanged

        protected override void OnRenderSizeChanged( SizeChangedInfo sizeInfo )
        {
            base.OnRenderSizeChanged( sizeInfo );

            m_scroll.Minimum = 0;
            m_scroll.Maximum = m_layers.ActualHeight - 70;
            Draw( ChangeType.Resize );
        }
开发者ID:andrevdm,项目名称:WpfLayeredDrawingDemo,代码行数:8,代码来源:MainWindow.xaml.cs


注:本文中的System.Windows.SizeChangedInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。