Thanks for your answer, Andrey!
I will probably try to use InformationLayer but if it is possible
Correct me if I am mistaken in WetaherStation:
From consideration Styles.xaml and Main.xaml to me it is clear that
WeatherStation it is created with application of MVVM pattern and in ViewModel do not form Controls
ViewModel only operates with the data from DynamicSource in collection WetaherInfo
ViewModel defines commands who work with logic of data model, and are binded to Controls from View
All visual behaviour WetaherStation is realised in Xaml code with usage ControlTemplates and VisualStateManager
As a matter of fact, at choice Location on a map it is displayed
<local:WeatherInfoItemTemplateSelector x:Name = "WeatherInfoItemTemplateSelector"
BasicItemTemplate = "{StaticResource BasicWeatherInfoItemTemplate}"
DetailedItemTemplate = "{StaticResource DetailedWeatherInfoItemTemplate}"/>
<DataTemplate x:Key = "BasicWeatherInfoItemTemplate">
<! - here in Styles.xaml it is defined ControlTemplate with name WidgetButtonStyle->
<telerik:RadButton Style = "{StaticResource WidgetButtonStyle}"
telerik:MapLayer. Location = "{Binding LocationInfo. Center}"
<! - here there is a binding to the output agent of the command from ViewModel
private void OnViewDetailsCommandExecuted (object obj)
->
Command = "{Binding DataContext. ViewDetailsCommand, ElementName=RadMap1}" CommandParameter = "{Binding}"
Tag = "{Binding DataContext, ElementName=RadMap1}">
<! - in Styles.xaml->
<Style x:Key = "WidgetButtonStyle" TargetType = "telerik:RadButton">
Defines a number of states and logical units of this already new control
<VisualStateGroup x:Name = "CommonStates">
<VisualState x:Name = "MouseOver"> <! - displays a brief information->
Accordingly
<! - in Styles.xaml->
<Style x:Key = "DetailedPanelStyle" TargetType = "ContentControl">
<Setter Property = "VerticalAlignment" Value = "Center"/>
<Setter Property = "HorizontalAlignment" Value = "Center"/>
<Setter Property = "Template">
<Setter. Value>
<ControlTemplate TargetType = "ContentControl">
<!-- Defines new Control displaying the detailed information
It is important to me to understand logical switching between states and interaction thus with ViewModel.
By pressing on telerik:RadButton Style x:Key = "WidgetButtonStyle" we pass in state XState
and thus through a binding to the trigger output agent OnXState from ViewModel is called
-->
I need to realise following behaviour in the program
1. To load map BingProvider
2. To display on a map sensors in the form of Circles or ToolTip received of model EF4.0 through WCF or WCF RIA
3. The sensor has some measures
4. By pressing a sensor tag it is necessary to show RadGridView with current indications of sensors near the sensor on a map
5. It is necessary to display indications of several sensors in several RadGridView on a map
6. It is necessary to provide possibility to close the sensor indication
It agree with you, Andrey that example WeatherStation very difficult, but before me the simple task is put too not...
Please, once again I ask you to explain me the logic of transition between states at mapping
Thanks