public OrderOfBattleViewModel()
        {
            Mediator.Register(Constants.ACTION_CANCEL, DoActionCancel);
            Mediator.Register(Constants.ACTION_ITEM_WITH_GUID_REMOVED, DoActionItemWithGuidRemoved);
            Mediator.Register(Constants.ACTION_ITEM_WITH_GUID_ADDED, DoActionItemWithGuidAdded);

            // Check the ArcGIS Runtime is initialized
            if (!ArcGISRuntimeEnvironment.IsInitialized)
            {
                ArcGISRuntimeEnvironment.Initialize();
            }

            // hook the commands
            SearchCommand        = new RelayCommand(OnSearch);
            SymbolChangedCommand = new RelayCommand(OnSymbolChanged);

            // Create a new MilitarySymbolDictionary instance
            MilitarySymbolDictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525c);

            // Collection of view models for the displayed list of symbols
            Symbols = new ObservableCollection <SymbolViewModel>();

            // Set the image size
            _imageSize = 96;

            // org tree view
            _groupSymbol = new SymbolGroupViewModel(SymbolLoader.LoadSymbolWrapper());

            ExpandGroupSymbol(_groupSymbol);
        }
        public OrderOfBattleViewModel()
        {
            Mediator.Register(Constants.ACTION_CANCEL, DoActionCancel);
            Mediator.Register(Constants.ACTION_ITEM_WITH_GUID_REMOVED, DoActionItemWithGuidRemoved);
            Mediator.Register(Constants.ACTION_ITEM_WITH_GUID_ADDED, DoActionItemWithGuidAdded);

            // Check the ArcGIS Runtime is initialized
            if (!ArcGISRuntimeEnvironment.IsInitialized)
            {
                ArcGISRuntimeEnvironment.Initialize();
            }

            // hook the commands
            SearchCommand = new RelayCommand(OnSearch);
            SymbolChangedCommand = new RelayCommand(OnSymbolChanged);

            // Create a new MilitarySymbolDictionary instance
            MilitarySymbolDictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525c);

            // Collection of view models for the displayed list of symbols
            Symbols = new ObservableCollection<SymbolViewModel>();

            // Set the image size
            _imageSize = 96;

            // org tree view
            _groupSymbol = new SymbolGroupViewModel(SymbolLoader.LoadSymbolWrapper());

            ExpandGroupSymbol(_groupSymbol);
        }
 private void ExpandGroupSymbol(SymbolGroupViewModel groupSymbol)
 {
     foreach (var svm in groupSymbol.FirstGeneration)
     {
         ExpandSymbolTreeViewModelRecursive(svm);
     }
 }
 private void ExpandGroupSymbol(SymbolGroupViewModel groupSymbol)
 {
     foreach (var svm in groupSymbol.FirstGeneration)
     {
         ExpandSymbolTreeViewModelRecursive(svm);
     }
 }