Telerik Forums
UI for WPF Forum
1 answer
90 views
Is there an easy way to change the display order of Categories?  The categories are showing up in the display of the Pivot map  ( A  B )  I want them to show up ( B  A )  How do I specify the order?

Thanks
Paul
Petar Marchev
Telerik team
 answered on 10 Jun 2014
3 answers
601 views
Hello,

How can I set the HorizontalAlignment property to "Center" of a CheckBox Column (GridViewDataColumn = boolean)?

Regards,

Henrique
Yoan
Telerik team
 answered on 09 Jun 2014
11 answers
319 views
Hello!
I've implemented DragAndDrop behavior for my TimeLine. But my timelineitemssource have several groups. When I drag items inside the group all  is right. Start time in source are changing and visualization occured. My next goal is realise DragAndDrop between groups. And the goal is reached. But sometimes (I can't understand why) group soring is changed. Images attached. I have DataAnnotaion on timeline and it's height and margins depends on groups. When sorting changed occured all my logic breaks. Can you tell me when group sorting occured and what is the rule of sorting. If Group sorting can be disabled it's will be super!
Sorry for my English.
Tsvetie
Telerik team
 answered on 09 Jun 2014
5 answers
326 views
One TextBox is outside of RadPropertyGrid and One TextBox is inside RadPropertyGrid.  The two are set to IsReadOnly=True, but only the outside one actually show read-only.

Version: Telerik.Windows.Controls.Data, Version=2013.3.1316.45.
Compiled with .Net 4.5
WPF app.
<
Window
    x:Class="PropGridTest.MainWindow"
    x:Name="ThisControl"
    Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
 
        <TextBox IsReadOnly="True" Text="Read-only" />
 
        <telerik:RadPropertyGrid
            Grid.Row="1"
            AutoGeneratePropertyDefinitions="False"
            Item="{Binding ElementName=ThisControl}">
            <telerik:RadPropertyGrid.PropertyDefinitions>
                <telerik:PropertyDefinition  
                    DisplayName="Prop 1"
                    GroupName="Group 1"
                    OrderIndex="0">
                    <telerik:PropertyDefinition.EditorTemplate>
                        <DataTemplate DataType="telerik:PropertyDefinition">
                            <TextBox HorizontalAlignment="Left" IsReadOnly="True" Text="Read-only" Width="100"/>
                        </DataTemplate>
                    </telerik:PropertyDefinition.EditorTemplate>
                </telerik:PropertyDefinition>
            </telerik:RadPropertyGrid.PropertyDefinitions>
            </telerik:RadPropertyGrid>
    </Grid>
</Window>
Ivan Ivanov
Telerik team
 answered on 09 Jun 2014
6 answers
222 views
Hello Telerik,

I'm trying to specify a binding on a tile's displayindex through a style. For some reason i get an exception stating:

System.ArgumentNullException occurred
  HResult=-2147467261
  Message=Value cannot be null.
Parameter name: property
  Source=PresentationFramework
  ParamName=property
  StackTrace:
       at System.Windows.Setter.CheckValidProperty(DependencyProperty property)
  InnerException: 

This is my style for the tiles:

<!-- Tile Style -->
   
<Style TargetType="{x:Type telerik:Tile}">
        <Setter Property="Background">
<Setter.Value>
                <LinearGradientBrush>
                   <GradientStop Color="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:Tile}, Mode=FindAncestor}, Path=Content.Color.StartColor}" Offset="0.0" />
                   <GradientStop Color="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:Tile}, Mode=FindAncestor}, Path=Content.Color.EndColor}" Offset="1.0" />
                </LinearGradientBrush>
            </Setter.Value>
       </Setter>
       <Setter Property="TileType" Value="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Content.Size, Converter={StaticResource tileTypeConverter}}" />
       <Setter Property="DisplayIndex" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:Tile}, Mode=FindAncestor}, Path=Content.DisplayIndex, Mode=OneTime}" />
</Style>

Am I doing something obviously wrong?
Boris
Telerik team
 answered on 09 Jun 2014
3 answers
194 views
Hi,

I have a requirement of setting column widths to a uniform value, based on the widest column within a property group description. 

Attached is a drawing illustrating the requirement.

Is this possible to do?

Thanks,
Edwin


Kalin
Telerik team
 answered on 09 Jun 2014
5 answers
335 views
Hi,

using RadDiagram shows binding errors at debug:

System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=StartPoint; DataItem=null; target element is 'PathFigure' (HashCode=17749809); target property is 'StartPoint' (type 'Point')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=StartBezierPoint; DataItem=null; target element is 'LineSegment' (HashCode=40121966); target property is 'Point' (type 'Point')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=EndPoint; DataItem=null; target element is 'PathFigure' (HashCode=45256881); target property is 'StartPoint' (type 'Point')
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=EndBezierPoint; DataItem=null; target element is 'LineSegment' (HashCode=41585520); target property is 'Point' (type 'Point')

I ran the "custom connector" from Xaml-skd to check that I have no mistake in my application - shows the same errors.

Manfred
Petar Mladenov
Telerik team
 answered on 09 Jun 2014
6 answers
177 views
Hi

If I place a NumericUpDown control with Windows8Touch theme in a ScrollViewer control, I can no longer hold down the plus or minus buttons to change the value.  I can only do individual clicks.

Is there anyway to get round this?

Thanks

Nick
Kalin
Telerik team
 answered on 09 Jun 2014
5 answers
481 views
I am having some issues getting the row that is selected in any child grid.

My main grid is a grid of Manufacturers and each row can be expanded to view each manufacturer's parts. This is no problem. The problem is getting the current row with in each expanded child grid. Here is my code so far.

public partial class ManufacturersAndPartsSearch : Window
   {
       private ViewModels.ManufacturersAndPartsSearchViewModel vm;
       public ManufacturersAndPartsSearch()
       {
           InitializeComponent();
           var context = new ViewModels.ManufacturersAndPartsSearchViewModel(this);
           this.vm = context;
           this.DataContext = vm;
 
           GridViewTableDefinition d = new GridViewTableDefinition();
           d.Relation = new Telerik.Windows.Data.PropertyRelation("ChildParts");
 
           //add child table defination to gridview
           this.GridView.ChildTableDefinitions.Add(d);
            
 
           this.GridView.DataLoaded += GridView_DataLoaded;
 
           //this is to alter changes to each child grid
           this.GridView.DataLoading += GridView_DataLoading;
 
           //event to check and set the view model's current row to a heirarchial's currently selected row if selected
 
           //explanation
           /*The original code used data binding to set the current row in the viewmodel equal to the current row in the grid
            this worked for the original purpose; however, since heirarchial grids are created for each row in the parent grid
            that has parts saved in the database then there is no way to bind their currently selected row properties to the viewmodel
             
            The databinding was ditched and instead this route was taken which accounts for both types of grids*/
           this.GridView.SelectionChanged += GridView_SelectionChanged;
       }
 
       void GridView_SelectionChanged(object sender, SelectionChangeEventArgs e)
       {
           var grid = sender as RadGridView;
           var item = grid.SelectedItem;
           this.vm.CurrentItem = item;
           MessageBox.Show(item.GetType().ToString());
       }

When my message box shows I always get a type of "PartsManufacturerViewModel". This would be correct in the parent grid because I am binding to my viewmodel's "ManufacturersAndPartsSearchViewModel.CurrentItem which is of type object. Since I am binding the grid to a collection of PartsManufacturerViewModels then this is expected. When I click on a child row I still get the same type but I should be getting PartViewModel, which is a property inside of PartsManufacturerViewModel. 

The basic gist is this. PartsManufacturerViewModel holds data relevant to the manufacturer while it has a property called "ChildParts" which is a collection of PartViewModels (which hold data relevant to the part itself). It is this collection that I bind the ChildTableDefinitions to. 

My desired outcome is to be able to set "this.vm.CurrentItem" to either a PartsManufacturerViewModel or a PartViewModel depending on the current row that is clicked once, either in the parent or the child grid.



Here is the rest of my code (ViewModels) if it helps make things clearer.

public class PartsManufacturerViewModel : Accu_Base_Lib.Bases.ModelViewModelBase<DAL.PartsManufacturer>
   {
 
 
       public string Id
       {
           get { return (string)GetValue(IdProperty); }
           set { SetValue(IdProperty, value); }
       }
 
       // Using a DependencyProperty as the backing store for Id.  This enables animation, styling, binding, etc...
       public static readonly DependencyProperty IdProperty =
           DependencyProperty.Register("Id", typeof(string), typeof(PartsManufacturerViewModel));
 
 
 
 
       public string Name
       {
           get { return (string)GetValue(NameProperty); }
           set { Debug.WriteLine("ViewModel Name Changed " + this.Name); SetValue(NameProperty, value); }
       }
 
       // Using a DependencyProperty as the backing store for Name.  This enables animation, styling, binding, etc...
       public static readonly DependencyProperty NameProperty =
           DependencyProperty.Register("Name", typeof(string), typeof(PartsManufacturerViewModel));
 
       private ObservableCollection<PartViewModel> _childParts;
 
       public ObservableCollection<PartViewModel> ChildParts
       {
           get
           {
               if (this._childParts == null)
               {
                   GetChildren();
               }
 
               return this._childParts;
           }
 
           set
           {
               this._childParts = value;
           }
       }
 
        
       public PartsManufacturerViewModel(DAL.PartsManufacturer model)
            
       {
           base.Init(model);
           //Fills this viewmodel based off the model supplied.
           UpdateViewModelFromModel();
       }
 
       public PartsManufacturerViewModel()
       {
           base.Init();
           this.Model.Id = Guid.NewGuid().ToString();
           this.Model.Name = string.Empty;
           UpdateViewModelFromModel();
       }





public class PartViewModel : Accu_Base_Lib.Bases.ModelViewModelBase<DAL.Part>
   {
 
 
       public string Id
       {
           get { return (string)GetValue(IdProperty); }
           set { SetValue(IdProperty, value); }
       }
 
       // Using a DependencyProperty as the backing store for Id.  This enables animation, styling, binding, etc...
       public static readonly DependencyProperty IdProperty =
           DependencyProperty.Register("Id", typeof(string), typeof(PartViewModel));
 
 
 
 
       public string ManufacturerId
       {
           get { return (string)GetValue(ManufacturerIdProperty); }
           set { SetValue(ManufacturerIdProperty, value); }
       }
 
       // Using a DependencyProperty as the backing store for ManufacturerId.  This enables animation, styling, binding, etc...
       public static readonly DependencyProperty ManufacturerIdProperty =
           DependencyProperty.Register("ManufacturerId", typeof(string), typeof(PartViewModel));
 
 
 
 
       public string Name
       {
           get { return (string)GetValue(NameProperty); }
           set { SetValue(NameProperty, value); }
       }
 
       // Using a DependencyProperty as the backing store for Name.  This enables animation, styling, binding, etc...
       public static readonly DependencyProperty NameProperty =
           DependencyProperty.Register("Name", typeof(string), typeof(PartViewModel));
 
 
 
 
       public string ModelNo
       {
           get { return (string)GetValue(ModelNoProperty); }
           set { SetValue(ModelNoProperty, value); }
       }
 
       // Using a DependencyProperty as the backing store for ModelNo.  This enables animation, styling, binding, etc...
       public static readonly DependencyProperty ModelNoProperty =
           DependencyProperty.Register("ModelNo", typeof(string), typeof(PartViewModel));
 
 
 
 
 
 
 
 
       public decimal Price
       {
           get { return (decimal)GetValue(PriceProperty); }
           set {
               SetValue(PriceProperty, value); }
       }
 
       // Using a DependencyProperty as the backing store for Price.  This enables animation, styling, binding, etc...
       public static readonly DependencyProperty PriceProperty =
           DependencyProperty.Register("Price", typeof(decimal), typeof(PartViewModel));
 
        
 
        
 
        
 
 
       public PartViewModel(DAL.Part model)
            
       {
           base.Init(model);
           //Fills this viewmodel based off the model supplied.
           UpdateViewModelFromModel();
       }
 
       public PartViewModel()
       {
           base.Init();
           this.Model.Id = Guid.NewGuid().ToString();
           UpdateViewModelFromModel();
       }



Dimitrina
Telerik team
 answered on 09 Jun 2014
2 answers
104 views
I have a question about the recommended theming approach to use. I get the feeling that theming aspect of telerik controls has developed a little over the years, and there now appears to be a number of possible approaches, but it's not clear to me which is the best or recommended approach to take.

If we forget about the use of the StyleManager class, from what I can tell you can there are still a number of approaches

1- Link to the required Binaries, link to the theme DLL under the same location and specify a number of resource dictionaries in the format <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml" />

2 - Link to the required NoXaml.Binaries, link to the theme DLL under NoXaml.Binaries as well and specify the resource dictionaries as above

3 - Link to the required Binaries, include the required XAML Themes from the Themes.implicit directory as PAge resources and specify the local resource dictionaries as  <ResourceDictionary Source="Themes/System.Windows.xaml"/>

4 - Link to the required NoXAML.Binaries, include the required XAML Themes from the Themes.implicit directory as PAge resources and specify the local resource dictionaries as  <ResourceDictionary Source="Themes/System.Windows.xaml"/>


What's the differences and which would be the best approach to take?

Cheers
Jason
Top achievements
Rank 1
 answered on 09 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?