Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm working on an Engine application, and we use WPF when creating our UI. We've got a dialog for choosing scalebar styles, and it's setup using a WindowsFormsHost. Unfortunately the items in the SymbologyControl are too small to be of any practical use at all.

Am I dowing something wrong here, or is it somehow possible to set the size of the items?

XAML code:

<Window x:Class="ScalebarDialog"
        Height="340" Width="480"
        <WindowsFormsHost Name="_hostControl"/>

And code behind:

using System.IO;
using System.Windows;
using ESRI.ArcGIS;
using MyApp.Dialogs.ViewModels;
using AOctr = ESRI.ArcGIS.Controls;

namespace MyApp.Dialogs
    /// <summary>
    /// Interaction logic for ScalebarDialog.xaml
    /// </summary>
    public partial class ScalebarDialog: Window
        public AOctr.AxSymbologyControl AxSymbologyControl { get; private set; }

        public ScalebarDialog()

            AxSymbologyControl = new AOctr.AxSymbologyControl();
            _hostControl.Child = AxSymbologyControl;

        private void Window_Loaded(object sender, RoutedEventArgs e)
            var installPath = RuntimeManager.ActiveRuntime.Path;
            var styleFileName = Path.Combine(installPath, @"Styles\ESRI.ServerStyle");

            AxSymbologyControl.StyleClass = AOctr.esriSymbologyStyleClass.esriStyleClassScaleBars;
            AxSymbologyControl.Appearance = AOctr.esriControlsAppearance.esriFlat;
            AxSymbologyControl.DisplayStyle = AOctr.esriSymbologyDisplayStyle.esriDisplayStyleIcon;
            //AxSymbologyControl.DisplayStyle = AOctr.esriSymbologyDisplayStyle.esriDisplayStyleList;

            AOctr.ISymbologyStyleClass symbologyStyleClass = AxSymbologyControl.GetStyleClass(AxSymbologyControl.StyleClass);

I'll really appreciate any type of input on the matter :)

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.