Telerik Forums
UI for WPF Forum
1 answer
109 views
Dear Telerik team,

we are using the RadDateTimePicker component in a WPF application for Win 8 tablet devices (small screen resolution).
We are running into positioning issues if the control is at the center of the screen and there is not enough space to collapse the popup control.
Please see screenshot attached.
Apparently there is no PopopPosition property or something like that to specify the popup behavior.

Can you give us some advice to overcome this issue?

Thanks and greetings from Germany,
Chris
Konstantina
Telerik team
 answered on 04 Dec 2013
1 answer
716 views

RadWindow.Alert will not play nice with async operations as follows...


await _datacontext.SaveChangesAsync().ContinueWith((args) => {

   RadWindow.Alert("Saved!", "Success!");

}).ConfigureWait(false);



or



await _datacontext.SaveChangesAsync().ConfigureWait(false);

RadWindow.Alert("Saved!", "Success!");



throws this...



An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in WindowsBase.dll

Additional information: Exception has been thrown by the target of an invocation.


Exception:Thrown: "The calling thread must be STA, because many UI components require this." (System.InvalidOperationException)

A System.InvalidOperationException was thrown: "The calling thread must be STA, because many UI components require this."

Time: 11/30/2013 13:51:44

Thread:Worker Thread[6864]



I thought it was just me and Caliburn.Micro but its truly the control...



-Windows 8.1, Desktop Application, Lastest controls, Visual Studio 2013, Entity Framework 6.0-



Ventzi
Telerik team
 answered on 04 Dec 2013
6 answers
284 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
478 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
104 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
194 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
240 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
121 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
113 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
113 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?