本文整理汇总了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);
}
示例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));
}
示例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;
}
示例4: OnRenderSizeChanged
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
if (this.Model == null) return;
this.Model.BarLength = progress.ActualWidth;
base.OnRenderSizeChanged(sizeInfo);
}
示例5: OnRenderSizeChanged
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
base.OnRenderSizeChanged(sizeInfo);
//InvalidateArrange();
//LayoutChildren();
}
示例6: OnRenderSizeChanged
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
base.OnRenderSizeChanged(sizeInfo);
AcHeight = ActualHeight;
AcWidth = ActualWidth;
}
示例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);
}
示例8: OnRenderSizeChanged
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
if(sizeInfo.NewSize.Width > 0)
{
base.OnRenderSizeChanged(sizeInfo);
}
}
示例9: OnRenderSizeChanged
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
if (_standardHeight == 0)
_standardHeight = sizeInfo.NewSize.Height;
base.OnRenderSizeChanged(sizeInfo);
}
示例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);
}
示例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));
}
示例12: OnRenderSizeChanged
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
{
base.OnRenderSizeChanged(sizeInfo);
ResetTransformOrigin();
UpdateTransform();
}
示例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);
}
示例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);
}
示例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 );
}