本文整理汇总了C#中Map.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# Map.GetValue方法的具体用法?C# Map.GetValue怎么用?C# Map.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Map
的用法示例。
在下文中一共展示了Map.GetValue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetChildren
/// <summary>
/// Gets the Children collection of a map.
/// </summary>
/// <param name="element">The dependency object</param>
/// <returns>Returns <see cref="ObservableCollection<DependencyObject>"/></returns>
public static ObservableCollection<DependencyObject> GetChildren(Map element)
{
if (element == null)
{
throw new ArgumentNullException("element");
}
ObservableCollection<DependencyObject> childrenCollection = (ObservableCollection<DependencyObject>)element.GetValue(MapExtensions.ChildrenProperty);
if (childrenCollection == null)
{
MapExtensionsChildrenChangeManager childrenChangeManager;
childrenCollection = new ObservableCollection<DependencyObject>();
childrenChangeManager = new MapExtensionsChildrenChangeManager(childrenCollection)
{
Map = element
};
element.SetValue(MapExtensions.ChildrenProperty, childrenCollection);
element.SetValue(MapExtensions.ChildrenChangedManagerProperty, childrenChangeManager);
}
return childrenCollection;
}
示例2: GetHasBingLayers
public static bool GetHasBingLayers(Map o)
{
object unitObj = o.GetValue(HasBingLayersProperty);
if(unitObj != null && unitObj is bool)
return (bool)unitObj;
return false;
}
示例3: GetIsFullNavigationEnabled
public static bool GetIsFullNavigationEnabled(Map o)
{
object unitObj = o.GetValue(IsFullNavigationEnabledProperty);
if(unitObj != null && unitObj is bool)
return (bool)unitObj;
return false;
}
示例4: GetScaleBarMapUnit
public static MapUnit GetScaleBarMapUnit(Map o)
{
object unitObj = o.GetValue(ScaleBarMapUnitProperty);
if(unitObj != null && unitObj is MapUnit)
return (MapUnit)unitObj;
return MapUnit.Undefined;
}
示例5: GetWebMapSettings
public static WebMapSettings GetWebMapSettings(Map map)
{
return map.GetValue(MapProperties.WebMapSettingsProperty) as WebMapSettings;
}
示例6: GetGeocodeResult
public static BingMapsService.GeocodeResult GetGeocodeResult(Map target)
{
return (BingMapsService.GeocodeResult)target.GetValue(GeocodeResultProperty);
}