csharp System.Windows.FrameworkContentElement.Parent类(方法)实例源码

下面列出了csharp System.Windows.FrameworkContentElement.Parent 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Window   
// Traverse content in forward direction until the position is immediately after the opening 
// tag of a Run element, or the end of content is encountered.
while (position != null)
{
    // Is the current position just after an opening element tag?
    if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart)
    {
        // If so, is the tag a Run?
        if (position.Parent is Run)
            break;
    }

    // Not what we're looking for; on to the next position.
    position = position.GetNextContextPosition(LogicalDirection.Forward);
}


问题


面经


文章

微信
公众号

扫码关注公众号