Telerik Forums
UI for WPF Forum
1 answer
153 views
Hi,

how to set theme for predefined dialog when window from which dialog called is within the dll that is called from WinForms?
Currently the window is not displayed.

<Window.Resources>
       <ResourceDictionary>
           <ResourceDictionary.MergedDictionaries>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml"/>
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml"/
               <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
           </ResourceDictionary.MergedDictionaries>

bool? dialogResult = null;
                   RadWindow.Confirm(new DialogParameters()
                   {
                       Owner = this,
                       Closed = (w, x) =>
                       {
                           dialogResult = x.DialogResult;
                       }
                   });
Kalin
Telerik team
 answered on 17 Oct 2014
1 answer
176 views
Hello everyone!  

Im drawing a chart with RadCartesianCharts, and i have to display another value (age) instead custom x value datetime 

the structure for each point series is:

HeightPerson
{
  DateTime DateMeasure { get: set; }
  decimal    Height  { get: set; }
  decimal    Age  { get: set; }
}


and i'm using the following  horizontalAxis configuration:

<telerik:RadCartesianChart.HorizontalAxis>
  <chartView:DateTimeContinuousAxis LabelFitMode="Rotate"
                      LabelFormat="{Binding AxisXformat}"
                      Visibility="{Binding VisibilityAxis}"
                      Title="{Binding TitleX}" />
</telerik:RadCartesianChart.HorizontalAxis>



 and the code where i'm making series


var edadSeries = new LineSeries(){
              ItemsSource = vm.PersonAge,
              Visibility = System.Windows.Visibility.Visible,
             //here is where i'm binding the date, but i would like to bind the "Age" property
             //AnotherCategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "Age" },
             CategoryBinding = new PropertyNameDataPointBinding() { PropertyName = "DateMeasure" },
             ValueBinding = new PropertyNameDataPointBinding() { PropertyName = "Height" },
             BorderBrush = System.Windows.Media.Brushes.Black,
             BorderThickness = new Thickness(1),
};

another solution, could be show only x (datetime) values for datapoint in x axis for try to cheat in another way

regards
Martin Ivanov
Telerik team
 answered on 17 Oct 2014
1 answer
201 views
There is an UI inconsistency of the RadDiagram between version 2013.1.220.45 and 2014.2.729.45.

The visual hierarchy of my application is roughly that RadDiagram has a ContentControl which contains a ListBox. And the ListBox has some Items as to show descriptions on it. (The ListBoxItem is just has a TextBlock to show the description.)

The problem is that in case of the old version (2013.1.220.45) the TextBlock doesn’t automatically wrap the text (a description) when it gets longer.
But it does with the new version (2014.2.729.45).

For the UI consistency of my application, it should not be allowed to wrap the text automatically.

The Snoop tool shows me that the TextWrapping property of the TextBlock is set to “Wrap” with Local as Value Source in case of the new version.
But the old one sets it to “NoWrap” with DefaultStyle as Value Source.

Any help would be appreciated.
Martin Ivanov
Telerik team
 answered on 17 Oct 2014
1 answer
67 views
Hi,

I would like to use sparklines in a gridview. The control closer to my needs seem to be the RadScatterSparkline.
I need exactly a points chart but I would like to be able to draw one to two additional lines on demand.
Those line need to be horizontal straight line and reprensent target number or min or max, etc.
1. I need to add one to two straight lines.
2. I need to get bigger dots.
3. I need to get separate color for each dot.

Here's a picture of what I'm talking about.

Is it possible to achieve that with a RadScatterSparkline or other controls?

Thank you for your help!
Petar Marchev
Telerik team
 answered on 17 Oct 2014
1 answer
150 views
Hi,

I would like to know if it's possible to not have a SelectedItem when the dropdown appear?!? What I'm trying to do is when the dropdown appear, if the user press the down key, I want the first to become selected not automatically when the dropdown appear...

Thank's
Alain
Nasko
Telerik team
 answered on 17 Oct 2014
8 answers
862 views
Hi,

Existing behavior:
I have a RadAutoCompleteBox with multiple selection in my WPF view.

I have added the code to open the drop down values when mouse clicked for the first time or got focus on AutoCompeleteBox. After selecting the single item, I am not able to open the drop down values again by using mouse click. I have to focus on another element in the view and focus back to auto complete box, it opens the drop down values on mouse click.

Problem:
I want to open the drop down values on mouse click after selecting the item (not by typing).

Reference:
I have checked "Demo - Telerik UI for WPF", it also has the same behavior.

Let me know if you have any questions.

Kind Regards,
NP.
Nirav
Top achievements
Rank 1
 answered on 17 Oct 2014
2 answers
581 views
I have the following RadGridView defined:                    

<telerik:RadGridView Grid.Row="1" x:Name="gvUnits" ItemsSource="{Binding UnitsOfMeasure}" ColumnWidth="*" 
                                         AutoGenerateColumns="False"
                                         RowEditEnded="Entity_EditEnded"
                                         Deleted="Entity_Deleted"
                                         Margin="5">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" IsReadOnly="False"/>
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>

From what I've read there should be a default cell edit template, but when I click on an item I only get a blank box. I have also tried adding a custom celledittmplate as follows:

                    <telerik:RadGridView Grid.Row="1" x:Name="gvUnits" ItemsSource="{Binding UnitsOfMeasure, Mode=TwoWay}" ColumnWidth="*" 
                                         AutoGenerateColumns="False"
                                         RowEditEnded="Entity_EditEnded"
                                         Deleted="Entity_Deleted"
                                         Margin="5">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" IsReadOnly="False">
                                <telerik:GridViewDataColumn.CellEditTemplate>
                                    <DataTemplate>
                                        <TextBox Text="{Binding Name}"/>
                                    </DataTemplate>
                                </telerik:GridViewDataColumn.CellEditTemplate>
                            </telerik:GridViewDataColumn>
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
 Is there something else I need to do to make the text editable? Is it one-way binding by default?

I'm sure this is an easy question, I'm just new to your controls.
Eric
Top achievements
Rank 1
 answered on 16 Oct 2014
4 answers
339 views
Hi

I have a RadGridView with its ItemsSource bound to a RadObservableCollection. I have applied both custom filtering and grouping to the GridView.

The problem is that not all items are shown after the RadObservableCollection have been cleared and updated. It could be that I only see one row out of twelwe. There is space for the rest of the items but the area only shows the background color. Hovering the area does not do any difference. Only when I touch the scrollbar all rows appear.

Here is how I update the RadObservableCollection:

   VideoLossItems.SuspendNotifications();
   VideoLossItems.Clear();
   VideoLossItems.AddRange(items);
   VideoLossItems.ResumeNotifications();

I am attaching two files that show the difference.

Do you know what might be causing this issue? Is there a decent workaround for it?
Ola
Top achievements
Rank 1
 answered on 16 Oct 2014
4 answers
260 views
Hello I am trying to create a simple RadGridView based UserControl. I am getting all the data to display but cannot seem to get any attributes to set on the Child Grid. I've created a template grid for the child grid but it always seems to AutoGenerateColumns and ignore my column definitions along with any specific attributes at the Grid level.

Here is my Control w/ Grid:

<UserControl x:Class="CCIGrid02.Views.WbsUserControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:viewModels="clr-namespace:MetaEstimatingProject.ViewModels;assembly=MetaEstimatingProject"
             mc:Ignorable="d"
             d:DesignHeight="480" d:DesignWidth="640">
    <Grid>
        <Grid.Resources>
            <viewModels:WbsViewModel x:Key="WbsViewModel" />
            <DataTemplate x:Key="RowDetailsTemplate">
                <telerik:RadGridView Name="valsgrid" AutoGenerateColumns="False" CanUserDeleteRows="True" CanUserInsertRows="True"
                                     ShowInsertRow="True" ShowGroupPanel="False"
                                     Width="640" Height="480">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Code}" Width="100"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Width="250"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Notes}" Width="500"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </DataTemplate>
 
        </Grid.Resources>
         
        <telerik:RadGridView x:Name="gridView" ItemsSource="{Binding WbsKeys, Source={StaticResource WbsViewModel}}"
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
                             AutoGenerateColumns="False" ShowInsertRow="True" ShowGroupPanel="False">           
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Key}" Header="Wbs Key" UniqueName="WbsKey" MinWidth="125"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description" UniqueName="WbsDesc" MinWidth="175"/>
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition>
                    <telerik:GridViewTableDefinition.Relation>
                        <telerik:PropertyRelation ParentPropertyName="Values" />
                    </telerik:GridViewTableDefinition.Relation>
                </telerik:GridViewTableDefinition>
            </telerik:RadGridView.ChildTableDefinitions>
             
             
        </telerik:RadGridView>
    </Grid>
</UserControl>

Pretty simple right out of the example on the documentation.

Here is my Data objects I populate with mock data for testing:

public class WbsKey {
     #region C'tors
 
     public WbsKey() {
         Key = "EmptyKey";
         Description = "Empty Desc";
         Values = new List<WbsValue>();
     }
 
     public WbsKey(string key)
     {
         Key = key;
         Description = "Empty Desc";
         Values = new List<WbsValue>();
     }
 
     public WbsKey(string key, string description) {
         Key = key ?? "EmptyKey";
         Description = description ?? "Empty Desc";
         Values = new List<WbsValue>();
     }
 
     public WbsKey(string key, List<WbsValue> values) {
         Key = key ?? "EmptyKey";
         Values = values ?? new List<WbsValue>();
     }
 
     #endregion
 
     #region Instance Properties
 
     public string Key { get; set; }
     public string Description { get; set; }
     public List<WbsValue> Values { get; set; }
      
     #endregion
 }
public class WbsValue {
     #region C'tors
 
     public WbsValue() {
     }
 
     public WbsValue(string code, string description) {
         Code = code;
         Description = description;
     }
 
     public WbsValue(string code, string description, string notes) {
         Code = code;
         Description = description;
         Notes = notes;
     }
 
     #endregion
 
     #region Instance Properties
 
     public string Code { get; set; }
     public string Description { get; set; }
     public string Notes { get; set; }
 
     #endregion
 }

I also attached a screen shot of what I am talking about in the application.

If you look at the XAML I have these important attributes I need in the Details Grid:
<DataTemplate x:Key="RowDetailsTemplate">
                <telerik:RadGridView Name="valsgrid" AutoGenerateColumns="False" CanUserDeleteRows="True" CanUserInsertRows="True"
                                     ShowInsertRow="True" ShowGroupPanel="False"
                                     Width="640" Height="480">
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Code}" Width="100"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Width="250"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding Notes}" Width="500"/>
                    </telerik:RadGridView.Columns>
                </telerik:RadGridView>
            </DataTemplate>

The user does not need to see the Grouping bar and also should be able to add new rows, almost identical to the parent Grid.

I'd appreciate any advice. Thanks!


Rob
Top achievements
Rank 1
 answered on 16 Oct 2014
5 answers
153 views
Hello,

I have noticed when zooming on silverlight map control that objects are hidden when zooming.
Is there any way how to achieve that behavior on WPF map control by turning on/off some property or how to does it in different way?

Thx, Vlada
Petar Mladenov
Telerik team
 answered on 16 Oct 2014
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?