Telerik Forums
UI for WPF Forum
2 answers
182 views
I've started a new thread becouse that question can be interested to others members of the comunity. The exThread is: 
http://www.telerik.com/forums/timeline-group-sorting
Now my question about group height of groups in timeline control.
I have 3 groups (pic1) and i've got TimelineGroupPeriodControl instances (MainTimeline is my instance of radtimeline):

                var e = MainTimeline.ChildrenOfType<TimelineGroupPeriodControl>().ToList();
                e.ForEach(control =>
                {
                    var str = control.ActualHeight.ToString(CultureInfo.InvariantCulture);
                    builder.AppendLine(str);
                });
                MessageBox.Show(builder.ToString());

When the control is in state such as pic1 this code returns me result: 15, 15, 15;
When the items intersecs such as pic2 this code return me 15, 15, 15 too.
But the actual height of period groups is differnt in this 2 cases. How can I get the actualHeight of group. And groupName (скл... in my case) too.
Thanks!
nd one more qustion. With the new version of teleik wpf cotrols (2014) the radtimeline throws an exception in XAML visual designer. The stack trace is:

XamlParseException: TargetType "RadSlider" is not match the type of element "TimelineScrollBar".

 в System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
   в System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
   в System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
   в System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
   в System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
   в System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
   в System.Windows.FrameworkElement.ApplyTemplate()
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)
   в System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   в System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   в System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   в System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)
   в MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   в System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)
   в System.Windows.Controls.Border.MeasureOverride(Size constraint)
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)
   в System.Windows.Controls.Control.MeasureOverride(Size constraint)
   в System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   в System.Windows.UIElement.Measure(Size availableSize)


ilusha
Top achievements
Rank 1
 answered on 10 Jun 2014
1 answer
110 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
637 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
357 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
375 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
264 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
230 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
439 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
204 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
518 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
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?