本文整理汇总了C#中DependencyObject.GetValueBase方法的典型用法代码示例。如果您正苦于以下问题:C# DependencyObject.GetValueBase方法的具体用法?C# DependencyObject.GetValueBase怎么用?C# DependencyObject.GetValueBase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DependencyObject
的用法示例。
在下文中一共展示了DependencyObject.GetValueBase方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnGetRuleConditions
internal static object OnGetRuleConditions(DependencyObject dependencyObject)
{
if (dependencyObject == null)
throw new ArgumentNullException("dependencyObject");
RuleDefinitions rules = dependencyObject.GetValueBase(RuleDefinitions.RuleDefinitionsProperty) as RuleDefinitions;
if (rules != null)
return rules;
Activity rootActivity = dependencyObject as Activity;
if (rootActivity.Parent == null)
{
rules = ConditionHelper.GetRuleDefinitionsFromManifest(rootActivity.GetType());
if (rules != null)
dependencyObject.SetValue(RuleDefinitions.RuleDefinitionsProperty, rules);
}
return rules;
}
示例2: OnGetRuleConditions
internal static object OnGetRuleConditions(DependencyObject dependencyObject)
{
if (dependencyObject == null)
{
throw new ArgumentNullException("dependencyObject");
}
RuleDefinitions valueBase = dependencyObject.GetValueBase(RuleDefinitionsProperty) as RuleDefinitions;
if (valueBase == null)
{
Activity activity = dependencyObject as Activity;
if (activity.Parent == null)
{
valueBase = ConditionHelper.GetRuleDefinitionsFromManifest(activity.GetType());
if (valueBase != null)
{
dependencyObject.SetValue(RuleDefinitionsProperty, valueBase);
}
}
}
return valueBase;
}