MapSuiteGisEditor/GisEditorInfrastructure/Plugins/Styles/StyleBuilder/StyleBuilderWindow.xaml.cs
/// <summary>
/// Determines whether the specified source item is parent.
/// </summary>
/// <param name="sourceItem">The source item.</param>
/// <param name="parent">The parent.</param>
/// <returns>
///   <c>true</c> if the specified source item is parent; otherwise, <c>false</c>.
/// </returns>
Determines whether the specified source item is parent.
Determines whether the specified source item is parent .
private bool IsParent(StyleLayerListItem sourceItem, StyleLayerListItem parent)
        {
            bool isParent = false;
            while (sourceItem.Parent != null)
            {
                if (sourceItem.Parent == parent)
                {
                    isParent = true;
                    break;
                }
                else
                {
                    sourceItem = sourceItem.Parent as StyleLayerListItem;
                }
            }
            return isParent;
        }
private bool IsParent ( StyleLayerListItem sourceItem , StyleLayerListItem parent ) { bool isParent = false ; while ( sourceItem . Parent != null ) { if ( sourceItem . Parent == parent ) { isParent = true ; break ; } else { sourceItem = sourceItem . Parent as StyleLayerListItem ; } } return isParent ; }
Determines whether the specified source item is parent.
Determines whether the specified source item is parent .
None
sourceItem
StyleLayerListItem
The source item.
The source item .
parent
StyleLayerListItem
None