private void dataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { chartdatas.Clear(); chartdatas2.Clear(); VariablesDescription temp = ((DataGrid)sender).SelectedItem as VariablesDescription; if (temp != null) { UpdateVariablesLabels(temp.Name); if (temp != null) { string name = temp.Name; foreach (ModelVariable model in this.data.ModelVariables) { string comp = model.variableName; string[] word = comp.Split('.'); string ToCompar = word[word.Length - 1]; if (ToCompar == name) { for (int i = 0; i < model.modalities.Count; ++i) { Modality modality = this.data.ModelVariables[2].modalities[i]; CharDataclass cd = new CharDataclass(); CharDataclass cd2 = new CharDataclass(); cd.XValue = modality.Percent_target; cd.YValue = i; cd2.YValue = i; chartdatas.Add(cd); cd2.XValue = modality.Percent_in_universe; chartdatas2.Add(cd2); } graph1.Series[0].ItemsSource = chartdatas; graph2.DataContext = chartdatas2; } } } } }<telerik:RadCartesianChart Height="240" HorizontalAlignment="Left" Margin="448,408,0,0" Name="graph1" VerticalAlignment="Top" Width="486" Zoom="10,1"> <telerik:RadCartesianChart.Behaviors> <telerik:ChartPanAndZoomBehavior PanMode="Horizontal" ZoomMode="Horizontal" /> </telerik:RadCartesianChart.Behaviors> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis /> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis HorizontalLocation="Left" Name="Axis1" /> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries CategoryBinding="YValue" ItemsSource="{Binding}" ValueBinding="XValue"> <telerik:BarSeries.PointTemplate> <DataTemplate> <Rectangle Fill="Black" /> </DataTemplate> </telerik:BarSeries.PointTemplate> </telerik:BarSeries> <telerik:LineSeries CategoryBinding="YValue" ItemsSource="{Binding}" Name="graph2" ValueBinding="XValue"> <telerik:LineSeries.PointTemplate> <DataTemplate> <Ellipse Fill="Red" Height="7" Width="7" /> </DataTemplate> </telerik:LineSeries.PointTemplate> <telerik:LineSeries.VerticalAxis> <telerik:LinearAxis HorizontalLocation="Right" Name="Axis2" /> </telerik:LineSeries.VerticalAxis> </telerik:LineSeries> </telerik:RadCartesianChart><ScrollViewer CanContentScroll="True"> <telerik:RadCarousel x:Name="carousel" IsSynchronizedWithCurrentItem="False" HorizontalScrollBarVisibility="Hidden" Loaded="carousel_Loaded" Height="309" > <telerik:RadCarousel.ReflectionSettings> <telerik:ReflectionSettings HiddenPercentage="0" OffsetY="0" Opacity="0" Visibility="Collapsed"/> </telerik:RadCarousel.ReflectionSettings> <Grid Height="111" Width="111" > <Grid.Background> <ImageBrush ImageSource="a.png"/> </Grid.Background> </Grid> <Grid Height="111" Width="111" > <Grid.Background> <ImageBrush ImageSource="b.png"/> </Grid.Background> </Grid> <Grid Height="111" Width="111"> <Grid.Background> <ImageBrush ImageSource="c.png"/> </Grid.Background> </Grid> </telerik:RadCarousel> </ScrollViewer> </Grid><telerik:InformationLayer Name="InformationLayerShape" ItemsSource="{Binding LayerShapes}"><telerik:InformationLayer.ItemTemplate> <DataTemplate> <views:MapPolygon Points="{Binding Locations}" Fill="#99FFFF00" StrokeThickness="4" Visibility="{Binding Visibility}" CaptionLocation="{Binding CaptionLocation}" Opacity=".5"> <views:WaterMapPolygon.CaptionTemplate> <DataTemplate> <TextBlock Text="{Binding CaptionText}" /> </DataTemplate> </views:WaterMapPolygon.CaptionTemplate> </views:MapPolygon> </DataTemplate></telerik:InformationLayer.ItemTemplate></telerik:InformationLayer><TextBlock Text="{Binding CaptionText}" />
with <TextBlock Text="Display this caption." />
the text is displayed.<Style TargetType="telerik:RadMaskedNumericInput"> <Setter Property="FontWeight" Value="Normal" /> <Setter Property="Width" Value="100" /> <Setter Property="TextMode" Value="PlainText" /> <Setter Property="IsClearButtonVisible" Value="True"/> <Setter Property="AllowSkipPlaceholders" Value="False"/> <Setter Property="AutoFillNumberGroupSeparators" Value="False"/> <Setter Property="SelectionOnFocus" Value="CaretToEnd"/> <Setter Property="HorizontalContentAlignment" Value="Left"/> <Setter Property="input:MaskedInputExtensions.Maximum" Value="99999"/> <Setter Property="Mask" Value=""/></Style>In my application I am using telerik:GridViewImageColumn.
My scenario is I am assigning collection to gridview each object row contains the byte array of image. Collection contains more than 1000 rows. Actually collection is for my company product users. We have few products (say 10).
I am showing those product user details in gridview with product image. Each user row contains product image byte array.
After assigning data source when I scroll the gridview sometimes getting exception “Target invocation exception”Exception type: TargetInvocationException
Source: mscorlib
-------======== InnerException ========
Description: The value should not null.
Parametername: uriSource
Exception type: ArgumentNullException
Source: PresentationCore
Stack Trace:
System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource, RequestCachePolicy uriCachePolicy)
Telerik.Windows.Controls.GridViewImageColumn.image_ImageFailed(Object sender,
ExceptionRoutedEventArgs e)
My xaml code for assigning data member is
<telerik:GridViewImageColumn Header="" UniqueName="colProductImage" DataMemberBinding="{Binding ProductImage}" ImageHeight="20" ImageWidth="20" />
What could be the solution for above problem?
My idea is to avoid above problem, instead of loading image byte data for each row just loads all 10 products data in
one collection and give the reference to image column with collection index. If it is possible please tell how to do .
Thanks for help.
Naresh Mesineni
I have two questions regarding the mapping control.
1) What mapping service do I need to purchase from Microsoft? Is it the service known as "Bing Maps for Enterprise - Known User Full"?
2) Thanks to Microsoft bending over backwards to accommodate any NSA request my client is unable to provide internet access (for fear NSA will have backdoor access to their critical infrastructure). Is there a way for me to (legally) cache the map data prior to shipment so internet access is not required once I've delivered the system to the customer. I understand the Microsoft license agreement requires full time internet access as part of the agreement. Could I run some sort of web cache? Are unique URL's used for each request to prevent caching? I'm not trying to avoid the license fees, I'm happy with those, it's the lack of internet access that's my problem.
Andrew
From the examples I can load a KML file to an informationlayer like this:
Dim streamResource As StreamResourceInfo = Application.GetResourceStream(New Uri("/MyApp;component/Resources/bulgaria.kml", UriKind.RelativeOrAbsolute))Dim elements As List(Of FrameworkElement) = KmlReader.Read(streamResource.Stream)For Each element As FrameworkElement In elements Me.informationLayer.Items.Add(element)Next element
... however in your Bulgaria.kml example I notice this:
<Icon>
<href>http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png</href>
</Icon>
... how can I change it so that placemark_circle.png is local, and does not require google? When I copy the .png file to a local location, no value for the icon href works for adding to the information layer. Do you have any suggestions?