protected static void OnDataSourcesChange(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d != null && e.NewValue != null) { FeaturesGrid me = d as FeaturesGrid; ObservableCollection <GeoFeatureCollection> dataSources = e.NewValue as ObservableCollection <GeoFeatureCollection>; foreach (GeoFeatureCollection dataset in dataSources) { me.BindDataset(dataset); } // Handle DataSources Collection Change Event dataSources.CollectionChanged += (sender, args) => { if (args.Action == NotifyCollectionChangedAction.Reset) { me.Clear(); } else if (args.Action == NotifyCollectionChangedAction.Add) { me.BindDataset(args.NewItems[0] as GeoFeatureCollection); } else if (args.Action == NotifyCollectionChangedAction.Remove) { me.RemoveDataset(args.OldItems[0] as GeoFeatureCollection); } else if (args.Action == NotifyCollectionChangedAction.Replace) // When use InsertAt/RemoveAt { me.UpdateBinding(); } }; } }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/SocialMediaWidget;component/MainPage.xaml", System.UriKind.Relative)); this.PanelSubmitSearch = ((System.Windows.Controls.StackPanel)(this.FindName("PanelSubmitSearch"))); this.radioMediaYouTube = ((System.Windows.Controls.RadioButton)(this.FindName("radioMediaYouTube"))); this.radioMediaFlickr = ((System.Windows.Controls.RadioButton)(this.FindName("radioMediaFlickr"))); this.radioMediaTwitter = ((System.Windows.Controls.RadioButton)(this.FindName("radioMediaTwitter"))); this.textSearchContent = ((System.Windows.Controls.TextBlock)(this.FindName("textSearchContent"))); this.radioSearchMapCenter = ((System.Windows.Controls.RadioButton)(this.FindName("radioSearchMapCenter"))); this.radioSearchGeometry = ((System.Windows.Controls.RadioButton)(this.FindName("radioSearchGeometry"))); this.lstGraphicWidget = ((System.Windows.Controls.ComboBox)(this.FindName("lstGraphicWidget"))); this.textKeyWord = ((System.Windows.Controls.TextBox)(this.FindName("textKeyWord"))); this.sliderSearchRadius = ((System.Windows.Controls.Slider)(this.FindName("sliderSearchRadius"))); this.panelYTTimeParam = ((System.Windows.Controls.StackPanel)(this.FindName("panelYTTimeParam"))); this.lstYouTubeTime = ((System.Windows.Controls.ComboBox)(this.FindName("lstYouTubeTime"))); this.panelFrTimeParam = ((System.Windows.Controls.StackPanel)(this.FindName("panelFrTimeParam"))); this.dateFlickrFrom = ((System.Windows.Controls.DatePicker)(this.FindName("dateFlickrFrom"))); this.dateFlickrTo = ((System.Windows.Controls.DatePicker)(this.FindName("dateFlickrTo"))); this.descTwitterTime = ((System.Windows.Controls.TextBlock)(this.FindName("descTwitterTime"))); this.PanelSearchResult = ((System.Windows.Controls.Grid)(this.FindName("PanelSearchResult"))); this.socialMediaGrid = ((ESRI.SilverlightViewer.Widget.FeaturesGrid)(this.FindName("socialMediaGrid"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/ESRI.SilverlightViewer;component/Widgets/IdentifyWidget.xaml", System.UriKind.Relative)); this.IdentifyResultGrid = ((ESRI.SilverlightViewer.Widget.FeaturesGrid)(this.FindName("IdentifyResultGrid"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/ESRI.SilverlightViewer;component/Widgets/QueryWidget.xaml", System.UriKind.Relative)); this.PanelAttributeQuery = ((System.Windows.Controls.StackPanel)(this.FindName("PanelAttributeQuery"))); this.lstAttQueryLayer = ((System.Windows.Controls.ComboBox)(this.FindName("lstAttQueryLayer"))); this.checkWithinMap = ((System.Windows.Controls.CheckBox)(this.FindName("checkWithinMap"))); this.lstAttQueryField = ((System.Windows.Controls.ListBox)(this.FindName("lstAttQueryField"))); this.txtAttQueryWhere = ((System.Windows.Controls.TextBox)(this.FindName("txtAttQueryWhere"))); this.btnAttWhereClear = ((System.Windows.Controls.Button)(this.FindName("btnAttWhereClear"))); this.OperatorsGrid = ((System.Windows.Controls.Grid)(this.FindName("OperatorsGrid"))); this.btnOperLike = ((System.Windows.Controls.Button)(this.FindName("btnOperLike"))); this.btnOperAnd = ((System.Windows.Controls.Button)(this.FindName("btnOperAnd"))); this.btnOperOr = ((System.Windows.Controls.Button)(this.FindName("btnOperOr"))); this.btnOperNot = ((System.Windows.Controls.Button)(this.FindName("btnOperNot"))); this.btnOperIs = ((System.Windows.Controls.Button)(this.FindName("btnOperIs"))); this.btnOperNULL = ((System.Windows.Controls.Button)(this.FindName("btnOperNULL"))); this.btnOperEqual = ((System.Windows.Controls.Button)(this.FindName("btnOperEqual"))); this.btnOperNotEqual = ((System.Windows.Controls.Button)(this.FindName("btnOperNotEqual"))); this.btnOperGreater = ((System.Windows.Controls.Button)(this.FindName("btnOperGreater"))); this.btnOperLess = ((System.Windows.Controls.Button)(this.FindName("btnOperLess"))); this.btnOperGtEqual = ((System.Windows.Controls.Button)(this.FindName("btnOperGtEqual"))); this.btnOperLtEqual = ((System.Windows.Controls.Button)(this.FindName("btnOperLtEqual"))); this.btnSubmitAttQuery = ((System.Windows.Controls.Button)(this.FindName("btnSubmitAttQuery"))); this.PanelSpatialQuery = ((System.Windows.Controls.StackPanel)(this.FindName("PanelSpatialQuery"))); this.lstGeoQueryLayer = ((System.Windows.Controls.ComboBox)(this.FindName("lstGeoQueryLayer"))); this.DrawModeButtonStack = ((System.Windows.Controls.StackPanel)(this.FindName("DrawModeButtonStack"))); this.drawModePoint = ((System.Windows.Controls.HyperlinkButton)(this.FindName("drawModePoint"))); this.drawModeLine = ((System.Windows.Controls.HyperlinkButton)(this.FindName("drawModeLine"))); this.drawModePoly = ((System.Windows.Controls.HyperlinkButton)(this.FindName("drawModePoly"))); this.drawModeRect = ((System.Windows.Controls.HyperlinkButton)(this.FindName("drawModeRect"))); this.drawModeFreeLine = ((System.Windows.Controls.HyperlinkButton)(this.FindName("drawModeFreeLine"))); this.drawModeFreePoly = ((System.Windows.Controls.HyperlinkButton)(this.FindName("drawModeFreePoly"))); this.txtDrawModeStatus = ((System.Windows.Controls.TextBlock)(this.FindName("txtDrawModeStatus"))); this.PanelQueryResult = ((System.Windows.Controls.Grid)(this.FindName("PanelQueryResult"))); this.QueryResultMessage = ((System.Windows.Controls.TextBlock)(this.FindName("QueryResultMessage"))); this.QueryResultGrid = ((ESRI.SilverlightViewer.Widget.FeaturesGrid)(this.FindName("QueryResultGrid"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/ESRI.SilverlightViewer;component/Widgets/SearchNearbyWidget.xaml", System.UriKind.Relative)); this.PanelSearchNearby = ((System.Windows.Controls.StackPanel)(this.FindName("PanelSearchNearby"))); this.lstSearchLayer = ((System.Windows.Controls.ComboBox)(this.FindName("lstSearchLayer"))); this.RadioBufferCenter = ((System.Windows.Controls.RadioButton)(this.FindName("RadioBufferCenter"))); this.RadioBufferGeometry = ((System.Windows.Controls.RadioButton)(this.FindName("RadioBufferGeometry"))); this.lstGraphicWidget = ((System.Windows.Controls.ComboBox)(this.FindName("lstGraphicWidget"))); this.txtBufferDistance = ((System.Windows.Controls.TextBox)(this.FindName("txtBufferDistance"))); this.lstBufferUnits = ((System.Windows.Controls.ComboBox)(this.FindName("lstBufferUnits"))); this.btnSubmitSearch = ((System.Windows.Controls.Button)(this.FindName("btnSubmitSearch"))); this.PanelSearchResult = ((System.Windows.Controls.Grid)(this.FindName("PanelSearchResult"))); this.SearchResultMessage = ((System.Windows.Controls.TextBlock)(this.FindName("SearchResultMessage"))); this.SearchResultGrid = ((ESRI.SilverlightViewer.Widget.FeaturesGrid)(this.FindName("SearchResultGrid"))); }