本文整理匯總了C#中Windows.UI.Xaml.DependencyObject.GetTag方法的典型用法代碼示例。如果您正苦於以下問題:C# DependencyObject.GetTag方法的具體用法?C# DependencyObject.GetTag怎麽用?C# DependencyObject.GetTag使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Windows.UI.Xaml.DependencyObject
的用法示例。
在下文中一共展示了DependencyObject.GetTag方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DropView
private void DropView(DependencyObject view)
{
DispatcherHelpers.AssertOnDispatcher();
var tag = view.GetTag();
if (!_rootTags.ContainsKey(tag))
{
// For non-root views, we notify the view manager with `OnDropViewInstance`
var mgr = ResolveViewManager(tag);
mgr.OnDropViewInstance(view.GetReactContext(), view);
}
var viewManager = default(IViewManager);
if (_tagsToViewManagers.TryGetValue(tag, out viewManager))
{
var viewParentManager = viewManager as IViewParentManager;
if (viewParentManager != null)
{
for (var i = viewParentManager.GetChildCount(view) - 1; i >= 0; --i)
{
var child = viewParentManager.GetChildAt(view, i);
var managedChild = default(DependencyObject);
if (_tagsToViews.TryGetValue(child.GetTag(), out managedChild))
{
DropView(managedChild);
}
}
viewParentManager.RemoveAllChildren(view);
}
}
_tagsToViews.Remove(tag);
_tagsToViewManagers.Remove(tag);
}