Telerik Forums
UI for WPF Forum
1 answer
123 views

Hi

After upgrade to version - WPF_Q3_2012_SP1 ,I got 2 regression that i can't fix , Any help appreciate:
1) The size of the slider becomes very big , when i use   MaxWidth , the slider cut some of the text i used  (i see only 2 value instead of 4 ),
When i define width on each text content the text still big because the slider spaces between each text stay on same size , only the text got the limit .
Any idea how to fix this issue ?
2) The combination of  telerik:RadSlider.TickTemplate + label with test + Value="{Binding Path=ScopeSlider, Mode=TwoWay}" 
Stop working when i try to initialize the slider with different value .
It's start always from begining 

works on win 7 + vs2010

Thanks
Oren
 
          <telerik:RadSlider x:Uid="Scope" x:Name="Scope" <br>                    Value="{Binding Path=ScopeSlider, Mode=TwoWay}" Grid.Column="1" Maximum="{Binding Path=MaxScopeZeroIndex}" TickFrequency="1"  IsMoveToPointEnabled="true" IsSnapToTickEnabled="True" TickPlacement="BottomRight" Margin="10,0,35,0"><br>            <telerik:RadSlider.TickTemplate><br>                <DataTemplate x:Uid="DataTemplate_1" ><br>                    <StackPanel x:Uid="StackPanel_1"><br>                        <Ellipse x:Uid="Ellipse_1" Width="1" Height="4" Fill="Black" /><br>                        <Label x:Uid="Label_2" Content="{Binding Converter={StaticResource ScopeNameConverter}}" HorizontalAlignment="Center"/><br>                    </StackPanel><br>                </DataTemplate><br>            </telerik:RadSlider.TickTemplate><br>        </telerik:RadSlider>
Kiril Vandov
Telerik team
 answered on 14 May 2013
7 answers
358 views

I found the next xaml code for windows gridView (template selector):

<DataGridTemplateColumn>
                 <DataGridTemplateColumn.HeaderTemplate>
                        <DataTemplate>
                            <ItemsControl ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:TypeWindow}},
                                 Path=DataContext.Headers}">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Horizontal"/>
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <TextBlock Margin="2" Width="{Binding Width}" Foreground="{Binding Color}" Text="{Binding Data}"/>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </DataTemplate>
                    </DataGridTemplateColumn.HeaderTemplate>
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <ItemsControl ItemsSource="{Binding ColumnsData}"
                                          ItemTemplateSelector="{StaticResource typeSelector}">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Horizontal"/>
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                            </ItemsControl>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

for <telerik:RadGridView.Columns> I get this error: "Error 1 A value of type 'DataGridTemplateColumn' cannot be added to a collection or dictionary of type 'GridViewColumnCollection'. C:\Users\arivlin\documents\visual studio 2010\Projects\bindTests\bindTests\UCGrid.xaml 33 17 bindTests"

What object can I use for  DataGridTemplateColumn ?

Dimitrina
Telerik team
 answered on 14 May 2013
3 answers
196 views
I'm guessing that this is an easy one, but I'm coming up blank.  How to you put the NumericUpDown in a hex mode?

Thanks,
Tony
Konstantina
Telerik team
 answered on 14 May 2013
6 answers
295 views
I have been trying to implement DnD between ListBox controls in WPF and also reordering items in the list box. 
The situation that I have is 3 listboxes, one is the "Toolbox" which contains all of the objects that will ever be dragged, one which they get dragged onto, called the "Workfow", and another one called the "Output" which objects from the "Workflow" get dragged from. When dragging, all objects should be copied rather than moved across.  The "Toolbox" and "Workflow" listboxes are bound to lists of "Element" objects, and the "Output" listbox is bound to a list of KeyValuePair<string, string> objects which gets populated when the element is dropped from the "Workflow" listbox.  A bit complicated I know.

Dragging from "Toolbox" to "Workflow" works fine, and reordering items in "Workflow" works too, but when I try and drag from "Workflow" to "Output" the DragDropState.DraggedItems property is always empty.  

Below is my override of the ListBoxDragDropBehavior

public class WfBehavior : ListBoxDragDropBehavior
    {
        public override void Drop(DragDropState state)
        {
            foreach (object o in state.DraggedItems)
            {
                if (Dropped != null)
                {
                    Dropped(o as Element, state.InsertIndex);
                }
            }
            base.Drop(state);
        }
 
        protected override bool IsMovingItems(DragDropState state)
        {
            return state.IsSameControl;
        }
 
        public static event DroppedEventHandler Dropped;
    }
 
    public delegate void DroppedEventHandler(Element element, int index);

Nick
Telerik team
 answered on 14 May 2013
1 answer
107 views
avatar

Hi,
Thanks for the wonderful chart control provided from telerik. Is there a feature like dragging the chart area and datapoints gets updated depending on the drag.



Scenario:
1. RadCartesianChart holding queue with 1000 data points.
2. But the current chart view shows only latest 10 points.
3. If drag the chart area to left/right, then data points must get updated. (this must depend on drag sensitivity).
4. This is some thing like playing the chart area w.r.t to datapoints in the queue.
5. Should have an event warning me that i am at point 0 and point 1000 on the graph. (start and end of the queue).

Please reply AS SOON AS POSSIBLE.

Thanks,
Supriya
Petar Kirov
Telerik team
 answered on 14 May 2013
26 answers
521 views
Is there a way to export a hierarchical radgridview to excel or word?
Dimitrina
Telerik team
 answered on 14 May 2013
1 answer
278 views
Hi,

I need to give an image watermark to my richtextbox. Is it possible from C#?

Thanks for replying,
Henry.
Shinu
Top achievements
Rank 2
 answered on 14 May 2013
2 answers
314 views
Hi, 

I want the error tool tip on masked text similar to normal WPF textbox. Please find attached images.
I also want the border of the masked input text to be red when an invalid number given as input. 
Could you help me to achieve this? 
I am not sure whether this request raised by anyone but i couldn't find the solution in any of the threads.
Let me know if you need more information on this.

Thanks,
Vivek
Vivek
Top achievements
Rank 2
 answered on 14 May 2013
1 answer
83 views
Hi, is there a way so that the event CellEditEnded fires at the pasting of a value into cell?
i'm not succeding...

Thanks in advanced.
Dimitrina
Telerik team
 answered on 14 May 2013
3 answers
611 views
Hi guys

Ok two basic classes:

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
 
namespace ProjectMaster.Core.Business
{
    public class Project
    {
        #region Fields
 
        private string _name;
        private double _budget;
        private DateTime _startDate;
        private DateTime _finishDate;
        private int _duration;
        private ObservableCollection<Phase> _phases;
 
        #endregion
 
        #region Properties
 
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
 
        public double Budget
        {
            get { return _budget; }
            set { _budget = value; }
        }
 
        public DateTime StartDate
        {
            get { return _startDate; }
            set { _startDate = value; }
        }
 
        public DateTime FinishDate
        {
            get { return _finishDate; }
            set { _finishDate = value; }
        }
 
        public int Duration
        {
            get
            {
                _duration = (_finishDate - _startDate).Days;
                return _duration;
            }
            set { _duration = value; }
        }
 
        public ObservableCollection<Phase> Phases
        {
            get { return _phases; }
            set { _phases = value; }
        }
 
        #endregion
 
        public Project(string name, int budget, DateTime startDate, DateTime finishDate)
        {
            this._name = name;
            this._budget = budget;
            this._startDate = startDate;
            this._finishDate = finishDate;
            _phases = new ObservableCollection<Phase>();
        }
    }
}

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
 
namespace ProjectMaster.Core.Business
{
    public class Phase
    {
        #region Fields
 
        private string _name { get; set; }
        private double _budget { get; set; }
        private DateTime _startDate { get; set; }
        private DateTime _finishDate { get; set; }
        private int _duration { get; set; }
        private ObservableCollection<Task> _tasks { get; set; }
 
        #endregion
 
        #region Properties
 
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }
 
        public double Budget
        {
            get { return _budget; }
            set { _budget = value; }
        }
 
        public DateTime StartDate
        {
            get { return _startDate; }
            set { _startDate = value; }
        }
 
        public DateTime FinishDate
        {
            get { return _finishDate; }
            set { _finishDate = value; }
        }
 
        public int Duration
        {
            get
            {
                _duration = (_finishDate - _startDate).Days;
                return _duration;
            }
            set { _duration = value; }
        }
 
        public ObservableCollection<Task> Tasks
        {
            get { return _tasks; }
            set { _tasks = value; }
        }
 
        public Phase(string name, int budget, DateTime startDate, DateTime finishDate)
        {
            this._name = name;
            this._budget = budget;
            this._startDate = startDate;
            this._finishDate = finishDate;
 
            _tasks = new ObservableCollection<Task>();
        }
 
        #endregion
    }
}

And the xaml that binds these classes to a RadTreeListView to get the expected output:

<telerik:RadTreeListView Grid.Row="2" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="6,0,0,0" AutoGenerateColumns="True" ItemsSource="{Binding Project, Mode=TwoWay}" SelectedItem="{Binding Item}">
 
     <telerik:RadTreeListView.ChildTableDefinitions>
         <telerik:TreeListViewTableDefinition ItemsSource="{Binding Phases}"/>
         <telerik:TreeListViewTableDefinition ItemsSource="{Binding Tasks}"/>
     </telerik:RadTreeListView.ChildTableDefinitions>
 
     <telerik:RadTreeListView.Columns>
         <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" />
 
         <telerik:GridViewDataColumn Header="Start Date" DataType="{x:Type System:DateTime}">
             <telerik:GridViewDataColumn.CellTemplate>
                 <DataTemplate>
                     <telerik:RadDatePicker SelectedValue="{Binding StartDate, Mode=TwoWay}" />
                 </DataTemplate>
             </telerik:GridViewDataColumn.CellTemplate>
         </telerik:GridViewDataColumn>
 
         <telerik:GridViewDataColumn Header="Finish Date" DataType="{x:Type System:DateTime}">
             <telerik:GridViewDataColumn.CellTemplate>
                 <DataTemplate>
                     <telerik:RadDatePicker SelectedValue="{Binding FinishDate, Mode=TwoWay}" />
                 </DataTemplate>
             </telerik:GridViewDataColumn.CellTemplate>
         </telerik:GridViewDataColumn>
 
         <telerik:GridViewDataColumn Header="Duration" DataMemberBinding="{Binding Duration}" DataType="{x:Type System:Int32}" />
 
         <telerik:GridViewDataColumn Header="Budget (Hrs)" DataMemberBinding="{Binding Budget}" DataType="{x:Type System:Double}" />
 
     </telerik:RadTreeListView.Columns>
 
 </telerik:RadTreeListView>


I've attached an image to show what the output is like.

Not what I want to be able to do is if the user clicks on a button, a new column is added to the TreeListVIew for eg a Resource column. Im really not sure how to go about this so any help/tips to get me in the right direction will be greatly appreciated!!

Thanking you in Advance! 
Dimitrina
Telerik team
 answered on 14 May 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?