当前位置: 首页>>代码示例>>C#>>正文


C# Map.GetValue方法代码示例

本文整理汇总了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&lt;DependencyObject&gt;"/></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;
        }
开发者ID:5nophilwu,项目名称:S1Nyan,代码行数:30,代码来源:MapExtensions.cs

示例2: GetHasBingLayers

        public static bool GetHasBingLayers(Map o)
        {
            object unitObj = o.GetValue(HasBingLayersProperty);
            if(unitObj != null && unitObj is bool)
                return (bool)unitObj;

            return false;
        }
开发者ID:Esri,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:BingExtensions.cs

示例3: GetIsFullNavigationEnabled

        public static bool GetIsFullNavigationEnabled(Map o)
        {
            object unitObj = o.GetValue(IsFullNavigationEnabledProperty);
            if(unitObj != null && unitObj is bool)
                return (bool)unitObj;

            return false;
        }
开发者ID:konglingjie,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:NavigationExtensions.cs

示例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;
        }
开发者ID:yulifengwx,项目名称:arcgis-viewer-silverlight,代码行数:8,代码来源:ScaleBarExtensions.cs

示例5: GetWebMapSettings

 public static WebMapSettings GetWebMapSettings(Map map)
 {
     return map.GetValue(MapProperties.WebMapSettingsProperty) as WebMapSettings;
 }
开发者ID:Esri,项目名称:arcgis-viewer-silverlight,代码行数:4,代码来源:MapProperties.cs

示例6: GetGeocodeResult

 public static BingMapsService.GeocodeResult GetGeocodeResult(Map target)
 {
     return (BingMapsService.GeocodeResult)target.GetValue(GeocodeResultProperty);
 }
开发者ID:Neeelsie,项目名称:REII422_DesktopApp,代码行数:4,代码来源:MapInteractivity.cs


注:本文中的Map.GetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。