protected void Page_Load(object sender, EventArgs e) { string agent = ConfigurationManager.AppSettings["MapAgentUrl"]; IServerConnection conn = ConnectionProviderRegistry.CreateConnection( "Maestro.Http", "Url", agent, "Username", "Anonymous", "Password", ""); var mdfId = "Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition"; if (conn.ResourceService.ResourceExists(mdfId)) { //Here's an example of pre-processing the WebLayout before loading it //in the AJAX viewer. //This technique can also be used to do things like: // // 1. Overriding the initial view //Create a WebLayout. By default the version created will be //the latest supported one on the mapguide server we've connected to. For example //connecting to MGOS 2.2 will create a version 1.1.0 WebLayout. All the known //resource versions have been registered on startup (see Global.asax.cs) Version ver = conn.Capabilities.GetMaxSupportedResourceVersion(ResourceTypes.WebLayout.ToString()); IWebLayout wl = ObjectFactory.CreateWebLayout(ver, mdfId); //What is IWebLayout2? It is an extension of IWebLayout that supports the ping server property. //This is the interface equivalent of WebLayout 1.1.0 schema. Most schema revisions in MapGuide //are additive and incremental, and our Object Model interfaces follow the same pattern. All new //interfaces inherit from their ancestor interface // //Anyway, what we want to do is if we created a 1.1.0 WebLayout, is to switch on the ping server //property, thus preventing session expiry IWebLayout2 wl2 = wl as IWebLayout2; if (wl2 != null) { wl2.EnablePingServer = true; } wl.Title = "Maestro API Web Samples"; wl.TaskPane.InitialTask = "../SamplesWeb/Tasks/Home.aspx"; string resId = "Session:" + conn.SessionID + "//Sheboygan.WebLayout"; conn.ResourceService.SaveResourceAs(wl, resId); Response.Redirect("../mapviewernet/ajaxviewer.aspx?WEBLAYOUT=" + resId + "&SESSION=" + conn.SessionID); } else { Response.Write("Could not find map definition: " + mdfId + "<br/>"); Response.Write("Please ensure the Sheboygan sample dataset has been loaded"); } }
public void Bind(IEditorService service, IWebLayout wl, IMenu menu) { _edsvc = service; Bind(_edsvc); _wl = wl; _wl.CommandSet.CustomCommandAdded += OnCustomCommandAdded; _wl.CommandSet.CustomCommandRemoved += OnCustomCommandRemoved; _rootMenu = menu; this.Model = _model = new MenuTreeModel(menu, wl); InitBuiltinCommandMenu(); InitCustomCommandMenu(); }
public override void Bind(IEditorService service) { _edsvc = service; _edsvc.RegisterCustomNotifier(this); _wl = (IWebLayout)_edsvc.GetEditedResource(); //Populate command set foreach (var cmd in _wl.CommandSet.Commands) { _commands.Add(new CommandDecorator(cmd)); } _commands.ListChanged += OnCommandSetListChanged; }
public void Bind(IEditorService service, IWebLayout wl, IMenu menu) { _edsvc = service; Bind(_edsvc); _wl = wl; _wl.CommandSet.CustomCommandAdded += OnCustomCommandAdded; _wl.CommandSet.CustomCommandRemoved += OnCustomCommandRemoved; _rootMenu = menu; this.Model = _model = new MenuTreeModel(menu, wl); InitBuiltinCommandMenu(); InitCustomCommandMenu(); }
public override void Bind(IEditorService service) { _edsvc = service; _edsvc.RegisterCustomNotifier(this); _wl = (IWebLayout)_edsvc.GetEditedResource(); //Populate command set foreach (var cmd in _wl.CommandSet.Commands) { _commands.Add(new CommandDecorator(cmd)); } _commands.ListChanged += OnCommandSetListChanged; }
public override void Bind(IEditorService service) { _wl = (IWebLayout)service.GetEditedResource(); _wl.CommandSet.CustomCommandAdded += OnCommandAdded; _wl.CommandSet.CustomCommandRemoved += OnCommandRemoved; edContextMenu.Bind(service, _wl, _wl.ContextMenu); edTaskMenu.Bind(service, _wl, _wl.TaskPane.TaskBar); edToolbar.Bind(service, _wl, _wl.ToolBar); foreach (var cmd in _wl.CommandSet.Commands) { var dec = new CommandDecorator(cmd); _cmds.Add(dec); _cmdsByName[dec.Name] = dec; } grdCommands.DataSource = _cmds; }
public override void Bind(IEditorService service) { _wl = (IWebLayout)service.GetEditedResource(); _wl.CommandSet.CustomCommandAdded += OnCommandAdded; _wl.CommandSet.CustomCommandRemoved += OnCommandRemoved; edContextMenu.Bind(service, _wl, _wl.ContextMenu); edTaskMenu.Bind(service, _wl, _wl.TaskPane.TaskBar); edToolbar.Bind(service, _wl, _wl.ToolBar); foreach (var cmd in _wl.CommandSet.Commands) { var dec = new CommandDecorator(cmd); _cmds.Add(dec); _cmdsByName[dec.Name] = dec; } grdCommands.DataSource = _cmds; }
internal void Bind(ISearchCommand searchCommandType, IEditorService service) { cmbTargetFrame.DataSource = Enum.GetValues(typeof(TargetType)); _init = true; Bind(service); _cmd = searchCommandType; _wl = (IWebLayout)_edsvc.GetEditedResource(); var wlMap = _wl.Map; wlMap.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebMapLayoutPropertyChanged, (eh) => wlMap.PropertyChanged -= eh); LoadLayers(); if (!string.IsNullOrEmpty(_cmd.Layer)) { foreach (var lyr in _layers) { if (lyr.Name == _cmd.Layer) { txtLayer.Text = _cmd.Layer; txtLayer.Tag = lyr.ResourceId; } } } TextBoxBinder.BindText(txtFrame, _cmd, nameof(_cmd.TargetFrame)); ComboBoxBinder.BindSelectedIndexChanged(cmbTargetFrame, nameof(cmbTargetFrame.SelectedItem), _cmd, nameof(_cmd.Target)); TextBoxBinder.BindText(txtLayer, _cmd, nameof(_cmd.Layer)); TextBoxBinder.BindText(txtFilter, _cmd, nameof(_cmd.Filter)); TextBoxBinder.BindText(txtPrompt, _cmd, nameof(_cmd.Prompt)); NumericBinder.BindValueChanged(numLimit, _cmd, nameof(_cmd.MatchLimit)); UpdateColumns(); foreach (var col in _cmd.ResultColumns.Column) { _columns.Add(col); } grdOutputColumns.DataSource = _columns; _columns.AddingNew += OnAddingNewColumn; _columns.ListChanged += OnColumnsChanged; }
internal void Bind(ISearchCommand searchCommandType, IEditorService service) { cmbTargetFrame.DataSource = Enum.GetValues(typeof(TargetType)); _init = true; Bind(service); _cmd = searchCommandType; _wl = (IWebLayout)_edsvc.GetEditedResource(); _wl.Map.PropertyChanged += OnWebLayoutPropertyChanged; LoadLayers(); if (!string.IsNullOrEmpty(_cmd.Layer)) { foreach (var lyr in _layers) { if (lyr.Name == _cmd.Layer) { txtLayer.Text = _cmd.Layer; txtLayer.Tag = lyr.ResourceId; } } } TextBoxBinder.BindText(txtFrame, _cmd, "TargetFrame"); ComboBoxBinder.BindSelectedIndexChanged(cmbTargetFrame, "SelectedItem", _cmd, "Target"); TextBoxBinder.BindText(txtLayer, _cmd, "Layer"); TextBoxBinder.BindText(txtFilter, _cmd, "Filter"); TextBoxBinder.BindText(txtPrompt, _cmd, "Prompt"); NumericBinder.BindValueChanged(numLimit, _cmd, "MatchLimit"); UpdateColumns(); foreach (var col in _cmd.ResultColumns.Column) { _columns.Add(col); } grdOutputColumns.DataSource = _columns; _columns.AddingNew += OnAddingNewColumn; _columns.ListChanged += OnColumnsChanged; }
private static void AttachPreviewCommands(IWebLayout wl) { var cmd = wl.CreateInvokeScriptCommand(); cmd.Name = "ZoomScale"; //NOXLATE cmd.Label = Strings.Label_ZoomToScale; cmd.Tooltip = Strings.Desc_ZoomToScale; cmd.Script = @" var map = parent.parent.GetMapFrame(); var center = map.GetCenter(); var scale = parseFloat(prompt('Enter the scale:')); map.ZoomToView(center.X, center.Y, scale, true); "; //NOXLATE cmd.TargetViewer = TargetViewerType.Ajax; cmd.ImageURL = "../stdicons/icon_zoom.gif"; //NOXLATE wl.CommandSet.AddCommand(cmd); var cmd2 = wl.CreateInvokeScriptCommand(); cmd2.Name = "GetMapKml"; //NOXLATE cmd2.Label = Strings.Label_GetMapKml; cmd2.Description = Strings.Desc_GetMapKml; cmd2.Tooltip = Strings.Desc_GetMapKml; cmd2.Script = @" var map = parent.parent.GetMapFrame(); var url = ""../mapagent/mapagent.fcgi?OPERATION=GETMAPKML&VERSION=1.0.0&FORMAT=KML&DISPLAYDPI=96&MAPDEFINITION=" + wl.Map.ResourceId + @"""; url += ""&SESSION="" + map.GetSessionId(); window.open(url);"; //NOXLATE cmd2.TargetViewer = TargetViewerType.Ajax; cmd2.ImageURL = "../stdicons/icon_invokescript.gif"; //NOXLATE wl.CommandSet.AddCommand(cmd2); var cmd3 = wl.CreateInvokeScriptCommand(); cmd3.Name = "GetExtents"; //NOXLATE cmd3.Label = Strings.Label_GetExtents; cmd3.Description = Strings.Desc_GetExtents; cmd3.Tooltip = Strings.Desc_GetExtents; cmd3.Script = @" var map = parent.parent.GetMapFrame(); alert('Map Extents\n\nLower Left: ' + map.extX1 + ', ' + map.extY2 + '\nUpper Right: ' + map.extX2 + ', ' + map.extY1); "; //NOXLATE cmd3.TargetViewer = TargetViewerType.Ajax; cmd3.ImageURL = "../stdicons/icon_invokescript.gif"; //NOXLATE wl.CommandSet.AddCommand(cmd3); var zoomScale = wl.CreateCommandItem(cmd.Name); var menu = wl.CreateFlyout(Strings.Label_Tools, Strings.Label_Tools, Strings.Label_ExtraTools, string.Empty, string.Empty, wl.CreateCommandItem("ZoomScale"), //NOXLATE wl.CreateCommandItem("GetMapKml"), //NOXLATE wl.CreateCommandItem("GetExtents") //NOXLATE ); wl.ToolBar.AddItem(menu); }
public MenuTreeModel(IMenu menu, IWebLayout wl) { _menu = menu; _wl = wl; }
private static void AttachPreviewCommands(IWebLayout wl) { var cmd = wl.CreateInvokeScriptCommand(); cmd.Name = "ZoomScale"; //NOXLATE cmd.Label = Strings.Label_ZoomToScale; cmd.Tooltip = Strings.Desc_ZoomToScale; cmd.Script = @" var map = parent.parent.GetMapFrame(); var center = map.GetCenter(); var scale = parseFloat(prompt('Enter the scale:')); map.ZoomToView(center.X, center.Y, scale, true); "; //NOXLATE cmd.TargetViewer = TargetViewerType.Ajax; cmd.ImageURL = "../stdicons/icon_zoom.gif"; //NOXLATE wl.CommandSet.AddCommand(cmd); var cmd2 = wl.CreateInvokeScriptCommand(); cmd2.Name = "GetMapKml"; //NOXLATE cmd2.Label = Strings.Label_GetMapKml; cmd2.Description = Strings.Desc_GetMapKml; cmd2.Tooltip = Strings.Desc_GetMapKml; cmd2.Script = @" var map = parent.parent.GetMapFrame(); var url = ""../mapagent/mapagent.fcgi?OPERATION=GETMAPKML&VERSION=1.0.0&FORMAT=KML&DISPLAYDPI=96&MAPDEFINITION=" + wl.Map.ResourceId + @"""; url += ""&SESSION="" + map.GetSessionId(); window.open(url);"; //NOXLATE cmd2.TargetViewer = TargetViewerType.Ajax; cmd2.ImageURL = "../stdicons/icon_invokescript.gif"; //NOXLATE wl.CommandSet.AddCommand(cmd2); var cmd3 = wl.CreateInvokeScriptCommand(); cmd3.Name = "GetExtents"; //NOXLATE cmd3.Label = Strings.Label_GetExtents; cmd3.Description = Strings.Desc_GetExtents; cmd3.Tooltip = Strings.Desc_GetExtents; cmd3.Script = @" var map = parent.parent.GetMapFrame(); alert('Map Extents\n\nLower Left: ' + map.extX1 + ', ' + map.extY2 + '\nUpper Right: ' + map.extX2 + ', ' + map.extY1); "; //NOXLATE cmd3.TargetViewer = TargetViewerType.Ajax; cmd3.ImageURL = "../stdicons/icon_invokescript.gif"; //NOXLATE wl.CommandSet.AddCommand(cmd3); var zoomScale = wl.CreateCommandItem(cmd.Name); var menu = wl.CreateFlyout(Strings.Label_Tools, Strings.Label_Tools, Strings.Label_ExtraTools, string.Empty, string.Empty, wl.CreateCommandItem("ZoomScale"), //NOXLATE wl.CreateCommandItem("GetMapKml"), //NOXLATE wl.CreateCommandItem("GetExtents") //NOXLATE ); wl.ToolBar.AddItem(menu); }
/// <summary> /// Performs base validation logic /// </summary> /// <param name="context"></param> /// <param name="resource"></param> /// <param name="recurse"></param> /// <returns></returns> protected static ValidationIssue[] ValidateBase(ResourceValidationContext context, IResource resource, bool recurse) { Check.ArgumentNotNull(context, nameof(context)); if (context.IsAlreadyValidated(resource.ResourceID)) { return(null); } if (resource.ResourceType != ResourceTypes.WebLayout.ToString()) { return(null); } List <ValidationIssue> issues = new List <ValidationIssue>(); IWebLayout layout = resource as IWebLayout; if (layout.Map == null || layout.Map.ResourceId == null) { issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_MissingMap, string.Format(Strings.WL_MissingMapError))); } else { //Check for duplicate command names var cmdSet = layout.CommandSet; Dictionary <string, ICommand> cmds = new Dictionary <string, ICommand>(); foreach (ICommand cmd in cmdSet.Commands) { if (cmds.ContainsKey(cmd.Name)) { issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_DuplicateCommandName, string.Format(Strings.WL_DuplicateCommandName, cmd.Name))); } else { cmds[cmd.Name] = cmd; } } //Check for duplicate property references in search commands foreach (ISearchCommand search in cmdSet.Commands.OfType <ISearchCommand>()) { Dictionary <string, string> resColProps = new Dictionary <string, string>(); foreach (IResultColumn resCol in search.ResultColumns.Column) { if (resColProps.ContainsKey(resCol.Property)) { issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_DuplicateSearchCommandResultColumn, string.Format(Strings.WL_DuplicateSearchResultColumn, search.Name, resCol.Property))); } else { resColProps.Add(resCol.Property, resCol.Property); } } } //Check for command references to non-existent commands foreach (IUIItem item in layout.ContextMenu.Items) { if (item.Function == UIItemFunctionType.Command) { ICommandItem cmdRef = (ICommandItem)item; if (!cmds.ContainsKey(cmdRef.Command)) { issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_NonExistentContextMenuCommandReference, string.Format(Strings.WL_NonExistentMenuCommandReference, cmdRef.Command))); } } } foreach (IUIItem item in layout.TaskPane.TaskBar.Items) { if (item.Function == UIItemFunctionType.Command) { ICommandItem cmdRef = (ICommandItem)item; if (!cmds.ContainsKey(cmdRef.Command)) { issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_NonExistentTaskPaneCommandReference, string.Format(Strings.WL_NonExistentTaskPaneCommandReference, cmdRef.Command))); } } } foreach (IUIItem item in layout.ToolBar.Items) { if (item.Function == UIItemFunctionType.Command) { ICommandItem cmdRef = (ICommandItem)item; if (!cmds.ContainsKey(cmdRef.Command)) { issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_NonExistentToolbarCommandReference, string.Format(Strings.WL_NonExistentToolbarCommandReference, cmdRef.Command))); } } } try { IMapDefinition mdef = (IMapDefinition)context.GetResource(layout.Map.ResourceId); if (layout.Map.InitialView != null) { var mapEnv = ObjectFactory.CreateEnvelope(mdef.Extents.MinX, mdef.Extents.MinY, mdef.Extents.MaxX, mdef.Extents.MaxY); if (!mapEnv.Contains(layout.Map.InitialView.CenterX, layout.Map.InitialView.CenterY)) { issues.Add(new ValidationIssue(mdef, ValidationStatus.Warning, ValidationStatusCode.Warning_WebLayout_InitialViewOutsideMapExtents, string.Format(Strings.WL_StartViewOutsideExtentsWarning))); } } if (recurse) { issues.AddRange(ResourceValidatorSet.Validate(context, mdef, true)); } } catch (Exception ex) { string msg = NestedExceptionMessageProcessor.GetFullMessage(ex); issues.Add(new ValidationIssue(layout, ValidationStatus.Error, ValidationStatusCode.Error_WebLayout_Generic, string.Format(Strings.WL_MapValidationError, layout.Map.ResourceId, msg))); } } context.MarkValidated(resource.ResourceID); return(issues.ToArray()); }
public override void Bind(IEditorService service) { _edsvc = service; _edsvc.RegisterCustomNotifier(this); _edsvc.Saved += OnSaved; _wl = (IWebLayout)_edsvc.GetEditedResource(); GeneratePreviewUrl(); _view = _wl.Map.InitialView; if (_view == null) { _view = _wl.CreateDefaultView(); chkCustomView.Checked = false; } else { chkCustomView.Checked = true; } CheckInitialView(); var wl2 = _wl as IWebLayout2; if (wl2 != null) { CheckBoxBinder.BindChecked(chkPingServer, wl2, nameof(wl2.EnablePingServer)); } else { chkPingServer.Visible = false; } TextBoxBinder.BindText(numX, _view, nameof(_view.CenterX)); TextBoxBinder.BindText(numY, _view, nameof(_view.CenterY)); TextBoxBinder.BindText(numScale, _view, nameof(_view.Scale)); TextBoxBinder.BindText(txtBrowserTitle, _wl, nameof(_wl.Title)); TextBoxBinder.BindText(txtMapDefinition, _wl.Map, nameof(_wl.Map.ResourceId)); TextBoxBinder.BindText(txtInitialTaskPaneUrl, _wl.TaskPane, nameof(_wl.TaskPane.InitialTask)); CheckBoxBinder.BindChecked(chkContextMenu, _wl.ContextMenu, nameof(_wl.ContextMenu.Visible)); CheckBoxBinder.BindChecked(chkLegend, _wl.InformationPane, nameof(_wl.InformationPane.LegendVisible)); CheckBoxBinder.BindChecked(chkProperties, _wl.InformationPane, nameof(_wl.InformationPane.PropertiesVisible)); CheckBoxBinder.BindChecked(chkStatusBar, _wl.StatusBar, nameof(_wl.StatusBar.Visible)); CheckBoxBinder.BindChecked(chkTaskPane, _wl.TaskPane, nameof(_wl.TaskPane.Visible)); CheckBoxBinder.BindChecked(chkTaskBar, _wl.TaskPane.TaskBar, nameof(_wl.TaskPane.TaskBar.Visible)); CheckBoxBinder.BindChecked(chkToolbar, _wl.ToolBar, nameof(_wl.ToolBar.Visible)); CheckBoxBinder.BindChecked(chkZoomControl, _wl.ZoomControl, nameof(_wl.ZoomControl.Visible)); ComboBoxBinder.BindSelectedIndexChanged(cmbHyperlinkTarget, nameof(cmbHyperlinkTarget.SelectedItem), _wl.Map, nameof(_wl.Map.HyperlinkTarget)); TextBoxBinder.BindText(txtHyperlinkFrame, _wl.Map, nameof(_wl.Map.HyperlinkTargetFrame)); TextBoxBinder.BindText(numInfoPaneWidth, _wl.InformationPane, nameof(_wl.InformationPane.Width)); TextBoxBinder.BindText(numTaskPaneWidth, _wl.TaskPane, nameof(_wl.TaskPane.Width)); _wl.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => _wl.PropertyChanged -= eh); _view.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => _view.PropertyChanged -= eh); var wlMap = _wl.Map; wlMap.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => wlMap.PropertyChanged -= eh); var ctx = _wl.ContextMenu; ctx.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => ctx.PropertyChanged -= eh); var info = _wl.InformationPane; info.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => info.PropertyChanged -= eh); var stat = _wl.StatusBar; stat.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => stat.PropertyChanged -= eh); var tpane = _wl.TaskPane; tpane.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => tpane.PropertyChanged -= eh); var tbar = tpane.TaskBar; tbar.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => tbar.PropertyChanged -= eh); var toolbar = _wl.ToolBar; toolbar.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => toolbar.PropertyChanged -= eh); var zoom = _wl.ZoomControl; zoom.PropertyChanged += WeakEventHandler.Wrap <PropertyChangedEventHandler>(OnWebLayoutPropertyChanged, (eh) => zoom.PropertyChanged -= eh); }
public override void Bind(IEditorService service) { _edsvc = service; _edsvc.RegisterCustomNotifier(this); _edsvc.Saved += OnSaved; _wl = (IWebLayout)_edsvc.GetEditedResource(); GeneratePreviewUrl(); _view = _wl.Map.InitialView; if (_view == null) { _view = _wl.CreateDefaultView(); chkCustomView.Checked = false; } else { chkCustomView.Checked = true; } CheckInitialView(); var wl2 = _wl as IWebLayout2; if (wl2 != null) CheckBoxBinder.BindChecked(chkPingServer, wl2, "EnablePingServer"); else chkPingServer.Visible = false; TextBoxBinder.BindText(numX, _view, "CenterX"); TextBoxBinder.BindText(numY, _view, "CenterY"); TextBoxBinder.BindText(numScale, _view, "Scale"); TextBoxBinder.BindText(txtBrowserTitle, _wl, "Title"); TextBoxBinder.BindText(txtMapDefinition, _wl.Map, "ResourceId"); TextBoxBinder.BindText(txtInitialTaskPaneUrl, _wl.TaskPane, "InitialTask"); CheckBoxBinder.BindChecked(chkContextMenu, _wl.ContextMenu, "Visible"); CheckBoxBinder.BindChecked(chkLegend, _wl.InformationPane, "LegendVisible"); CheckBoxBinder.BindChecked(chkProperties, _wl.InformationPane, "PropertiesVisible"); CheckBoxBinder.BindChecked(chkStatusBar, _wl.StatusBar, "Visible"); CheckBoxBinder.BindChecked(chkTaskPane, _wl.TaskPane, "Visible"); CheckBoxBinder.BindChecked(chkTaskBar, _wl.TaskPane.TaskBar, "Visible"); CheckBoxBinder.BindChecked(chkToolbar, _wl.ToolBar, "Visible"); CheckBoxBinder.BindChecked(chkZoomControl, _wl.ZoomControl, "Visible"); ComboBoxBinder.BindSelectedIndexChanged(cmbHyperlinkTarget, "SelectedItem", _wl.Map, "HyperlinkTarget"); TextBoxBinder.BindText(txtHyperlinkFrame, _wl.Map, "HyperlinkTargetFrame"); TextBoxBinder.BindText(numInfoPaneWidth, _wl.InformationPane, "Width"); TextBoxBinder.BindText(numTaskPaneWidth, _wl.TaskPane, "Width"); _wl.PropertyChanged += OnWebLayoutPropertyChanged; _view.PropertyChanged += OnWebLayoutPropertyChanged; _wl.Map.PropertyChanged += OnWebLayoutPropertyChanged; _wl.ContextMenu.PropertyChanged += OnWebLayoutPropertyChanged; _wl.InformationPane.PropertyChanged += OnWebLayoutPropertyChanged; _wl.StatusBar.PropertyChanged += OnWebLayoutPropertyChanged; _wl.TaskPane.PropertyChanged += OnWebLayoutPropertyChanged; _wl.TaskPane.TaskBar.PropertyChanged += OnWebLayoutPropertyChanged; _wl.ToolBar.PropertyChanged += OnWebLayoutPropertyChanged; _wl.ZoomControl.PropertyChanged += OnWebLayoutPropertyChanged; }