Telerik Forums
UI for WPF Forum
6 answers
293 views
Hi,

I am developing a WPF application and need to be able to do a contour plot.
I have researched this a bit and cant find a way to do it.
Does Telerik support Contour plots?

best regards,
Jeppe
Unisense
Top achievements
Rank 1
 answered on 04 Dec 2013
6 answers
498 views
I have a rad cartesian chart i need it to update each time the user  choose an item in a datagrid.

This is the code behind:
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;
 
                        }
                    }
 
                }
            }
        }


This is the xaml:
<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>

Using this code the chart display the first item, when i choose another one the chart doesn't update with the new datas.

Many thanks :)


Yavor
Telerik team
 answered on 04 Dec 2013
1 answer
112 views
Can I remove the frame of  grid?(attachment)

<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>
Maya
Telerik team
 answered on 04 Dec 2013
1 answer
205 views
I'm attempting to bind a TextBlock in a CaptionTemplate but it's not working.  If I just replace the binding with text it works fine.

Here is the code that does not display the caption:
<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>

If I replace  <TextBlock Text="{Binding CaptionText}" />
with  <TextBlock Text="Display this caption." />
t
he text is displayed.


How do I bind this to a property?

Andrey
Telerik team
 answered on 04 Dec 2013
2 answers
276 views
Hi All,

I have a collection of 1 million records and i am using radMap.ItemSource = myCollection; to bind my collection with map. It works but takes too much time in binding and also hangs the UI. Is there any optimized way of binding or processing of these huge collections on map. In some scenarios, I have to show all of these at once on map when we zoom out fully, in that case it also slow downs the UI. I am using Empty provider.

Thanks in advance.

Waqas Habib
Waqas
Top achievements
Rank 1
 answered on 04 Dec 2013
4 answers
126 views
<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>

The caret is always placed after the fist number when the control is on focus.
I am using 2013 Q3 version
Joel
Top achievements
Rank 1
Iron
 answered on 04 Dec 2013
2 answers
120 views
We are using a custom style for our WPF RadGridViews. For the most part, all the headers have been changed to use the custom color, but when grouping is enabled, a new header is automatically added above the group expander section that does not use the same styling as the other headers.

I have attached a screenshot as well as a...sample application...(scratch that, the forum won't let me upload zip files)...that demonstrates the problem. We are using the 2013Q2 release and a style/templating solution that we received from Telerik in a support ticket. There are also two other places highlighted in the screenshot that do not use the custom color (pink in the example). If you could help me change those as well it would be appreciated.

Thank you
Josh
Top achievements
Rank 1
 answered on 03 Dec 2013
0 answers
116 views
Hi Telerik,

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

naresh
Top achievements
Rank 1
 asked on 03 Dec 2013
3 answers
277 views

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

Andrey
Telerik team
 answered on 03 Dec 2013
1 answer
100 views

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?



Andrey
Telerik team
 answered on 03 Dec 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?