MapSuiteGisEditor/GisEditorInfrastructure/Plugins/Styles/StyleBuilder/StyleBuilderWindow.xaml.cs
/// <summary>
/// Handles the Loaded event of the StyleBuilderWindow control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
Handles the Loaded event of the StyleBuilderWindow control.
Handles the Loaded event of the StyleBuilderWindow control .
private void StyleBuilderWindow_Loaded(object sender, RoutedEventArgs e)
        {
            var styleToEdit = styleBuilderArguments.StyleToEdit;
            if (styleToEdit == null) styleToEdit = new CompositeStyle();
            styleBuilderResult = new StyleBuilderResult();
            styleBuilderViewModel = new StyleBuilderViewModel(styleToEdit, styleBuilderArguments);
            DataContext = styleBuilderViewModel;
            FromZoomLevelIndex = styleBuilderArguments.FromZoomLevelIndex;
            ToZoomLevelIndex = styleBuilderArguments.ToZoomLevelIndex;
            if (styleBuilderViewModel.RootStyleItem != null && styleBuilderViewModel.RootStyleItem.StyleItemViewModels.Count == 0)
            {
                if (Validate())
                {
                    styleBuilderViewModel.IsRootNodeSelected = true;
                    RootNodePanel.Background = new SolidColorBrush(Color.FromRgb(173, 216, 230));
                }
            }
        }
private void StyleBuilderWindow_Loaded ( object sender , RoutedEventArgs e ) { var styleToEdit = styleBuilderArguments . StyleToEdit ; if ( styleToEdit == null ) styleToEdit = new CompositeStyle ( ) ; styleBuilderResult = new StyleBuilderResult ( ) ; styleBuilderViewModel = new StyleBuilderViewModel ( styleToEdit , styleBuilderArguments ) ; DataContext = styleBuilderViewModel ; FromZoomLevelIndex = styleBuilderArguments . FromZoomLevelIndex ; ToZoomLevelIndex = styleBuilderArguments . ToZoomLevelIndex ; if ( styleBuilderViewModel . RootStyleItem != null && styleBuilderViewModel . RootStyleItem . StyleItemViewModels . Count == 0 ) { if ( Validate ( ) ) { styleBuilderViewModel . IsRootNodeSelected = true ; RootNodePanel . Background = new SolidColorBrush ( Color . FromRgb ( 173 , 216 , 230 ) ) ; } } }
Handles the Loaded event of the StyleBuilderWindow control.
Handles the Loaded event of the StyleBuilderWindow control .
sender
object
The source of the event.
The source of the event .
e
RoutedEventArgs
The  instance containing the event data.
The instance containing the event data .