How to load .style file in  axSymbologyControl?

1083
1
05-18-2011 11:57 PM
AnatoliiTerentiev
Occasional Contributor III
axSymbologyControl allow to load of .serverFileStyle, but how I can load .style file? Or can I edit .serverStyle file in arcgis Desctop?
Reply
0 Kudos
1 Reply
sujaygarapati
New Contributor
Dim sInstall As String = ReadRegistry("SOFTWARE\ESRI\CoreRuntime")
        Dim path As String = System.IO.Path.Combine(sInstall, "Styles")

        Dim pofd As OpenFileDialog = New OpenFileDialog()
        pofd.CheckPathExists = True
        pofd.CheckFileExists = True
        pofd.RestoreDirectory = True
        pofd.InitialDirectory = path

        pofd.Multiselect = False
        pofd.Title = "Symbols"
        pofd.Filter = "ESRI Style Set Files (*.ServerStyle)|*.ServerStyle"

        If pofd.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
            'Load the style file into the SymbologyControlz
            AxSymbologyControlMxd.LoadStyleFile(pofd.FileName)
            AxSymbologyControlMxd.Update()
            AxSymbologyControlMxd.Refresh()
        End If
Reply
0 Kudos