本文整理汇总了C#中System.Windows.Controls.GridViewColumnHeader.ReadLocalValue方法的典型用法代码示例。如果您正苦于以下问题:C# GridViewColumnHeader.ReadLocalValue方法的具体用法?C# GridViewColumnHeader.ReadLocalValue怎么用?C# GridViewColumnHeader.ReadLocalValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.GridViewColumnHeader
的用法示例。
在下文中一共展示了GridViewColumnHeader.ReadLocalValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateFloatingHeader
// Fill necessary properties in floating header
private void UpdateFloatingHeader(GridViewColumnHeader srcHeader)
{
Debug.Assert(srcHeader != null, "srcHeader is null");
Debug.Assert(_floatingHeader != null, "floating header is null");
_floatingHeader.Style = srcHeader.Style;
_floatingHeader.FloatSourceHeader = srcHeader;
_floatingHeader.Width = srcHeader.ActualWidth;
_floatingHeader.Height = srcHeader.ActualHeight;
_floatingHeader.SetValue(GridViewColumnHeader.ColumnPropertyKey, srcHeader.Column);
_floatingHeader.Visibility = Visibility.Hidden;
// override floating header's MinWidth/MinHeight to disable users to change floating header's Width/Height
_floatingHeader.MinWidth = srcHeader.MinWidth;
_floatingHeader.MinHeight = srcHeader.MinHeight;
object template = srcHeader.ReadLocalValue(GridViewColumnHeader.ContentTemplateProperty);
if ((template != DependencyProperty.UnsetValue) && (template != null))
{
_floatingHeader.ContentTemplate = srcHeader.ContentTemplate;
}
object selector = srcHeader.ReadLocalValue(GridViewColumnHeader.ContentTemplateSelectorProperty);
if ((selector != DependencyProperty.UnsetValue) && (selector != null))
{
_floatingHeader.ContentTemplateSelector = srcHeader.ContentTemplateSelector;
}
if (!(srcHeader.Content is Visual))
{
_floatingHeader.Content = srcHeader.Content;
}
}