Telerik Forums
UI for WPF Forum
1 answer
168 views
Hi, I would like to define a custom style for milestones. How to do that?
It looks like a TimelineItem is regarded to be a milestone if it's duration is zero - I guess this is the standard behavior of RadTimeline.

In the examples, the ItemTemplateSelector-property of RadTimeline is used, and DataTemplateSelectors in the ViewModel. Do I have to use these to define my own style for a milestone?

And another (maybe tricky) question: Is it possible to define a style for a milestone like in the attached image, so that each milestone has a dashed line going from the top of the control to the bottom?
As I understand it, the positions of the TimelineItems are calculated by RadTimeline, so if the custom style of the milestones would include such a dashed line (which would be an element with a very large height) that would be a problem, I guess?
Tsvetie
Telerik team
 answered on 12 Jul 2012
2 answers
85 views
GridView has few readonly columns. How to make readonly cells editable for new row?
I need to allow to enter some data on inserting and don't allow to edit on editing.
Anton
Top achievements
Rank 2
 answered on 12 Jul 2012
2 answers
163 views
Hello,

I'm currently getting myself introduced to ChartView and in my project I would like for the horizontal axis (DateTimeContinuousAxis) to dynamically select a LabelFormat depending on the time being presented. For full hours I'd like it to be "mm/ddd HH", otherwise just "HH:mm".

I'd prefer to do it in MVVM if possible but I'm not too religious about it. I have tried using a converter but I don't know how to obtain the actual value being affected by the format.

Can this be achieved?
Jesper
Top achievements
Rank 1
 answered on 12 Jul 2012
0 answers
84 views
I want to add "paste to selected cell" command to Row. I don't want to change SelectionMode="Extended".
I've added RoutedUICommand:

private void PasteToCell_Executed(object sender, ExecutedRoutedEventArgs e)
{
            GridViewCell cell = e.OriginalSource as GridViewCell;
            if (cell != null)
            {
                var value = Clipboard.GetText();
                cell.BeginEdit();
                TextBox tb = (TextBox)cell.GetEditingElement();
1 ->          tb.Text = value;
2 ->          if (ApplicationCommands.Paste.CanExecute(value, tb))
                    ApplicationCommands.Paste.Execute(value, tb);
3 ->          cell.Value = value;
4 ->          cell.SetCurrentValue(GridViewCell.ValueProperty, value);
5 ->          cell.SetValue(GridViewCell.ValueProperty, value);
                cell.CommitEdit();
            }
}
No one work. I don't know how to realize this feature.
Anton
Top achievements
Rank 2
 asked on 12 Jul 2012
2 answers
263 views
How to dynamic align text in columns, depends on column types. Eg. columns with numeric values should be alignment to right, with data to center, with text to left.
Columns are autogenerated.
Dimitrina
Telerik team
 answered on 12 Jul 2012
1 answer
144 views
Hi,
I would like to create a heat map based on a multidimensional array with 100 rows and 100 columns. However, your documentation does not provide any such code. Could you please provide me with links/examples that show how I might be able to achieve this?

Thank you
Petar Marchev
Telerik team
 answered on 12 Jul 2012
1 answer
164 views
Is it possible to make the TrackBall popup transparent? I'm using WPF only, no Silverlight or ExpressionBlend.
Petar Marchev
Telerik team
 answered on 12 Jul 2012
1 answer
67 views
Hey,

We have an Windows Explorer kind of implementation where we have folders and files. We are using RadTreeListView for our application.

I need your inputs in following case:

1. Let's a user search for a file.
2. File is found and location is tracked.
3. In that case, my folder structure should automatically opened [in explorer via RadTreeView]  and pointing to folder just tracked.

I'm trying to search file in already data bound RadTreeview. I tried to explore Items property but somehow it returned only null.
Can you please help, how to find a particular item/node in TreeListView?

Thanks,
Tarun
Pavel Pavlov
Telerik team
 answered on 12 Jul 2012
1 answer
102 views
Is it possible to make group header selectable so users can copy- paste the displayed value?
Pavel Pavlov
Telerik team
 answered on 12 Jul 2012
0 answers
143 views
Hi,
I am trying create a custom DialogWindow with my catigories. But When the window opening Combobox categories is clear.
My code is main window is
namespace Calendar
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        AppintmentViewModel main;
 
        public MainWindow()
        {
            InitializeComponent();
            main = new AppintmentViewModel();
            this.DataContext = main;
        }
    }
 
 
    internal class AppintmentViewModel : BaseViewModel
    {
        private ObservableCollection<Category> _Categories;
        ObservableCollection<Task> _Appointments;
 
        public AppintmentViewModel()
        {
            _Appointments = new ObservableCollection<Task>()
            {
 
                new Task(){Subject="April",Start =DateTime.Today,End =DateTime.Today.AddHours(4)},
            };
            _Categories = new ObservableCollection<Category>()
            {
 
                new Category(){ CategoryBrush= Brushes.Red, CategoryName="Red"},
                new Category(){CategoryBrush= Brushes.Blue, CategoryName="Blue"}
            };
        }
        public ObservableCollection<Task> Appointments
        {
            get
            {
                return _Appointments;
            }
            set
            {
                _Appointments = value;
                OnPropertyChanged("Appointments");
            }
        }
 
        public ObservableCollection<Category> Categories
        {
            get
            {
                return _Categories;
            }
            set
            {
                _Categories = value;
                OnPropertyChanged("Categories");
            }
        }
 
    }
 
    public class Task : Appointment
    {
         
        public override IAppointment Copy()
        {
 
            var newAppointment = new Task();
 
            newAppointment.CopyFrom(this);
 
            return newAppointment;
 
        }
 
 
 
        public override void CopyFrom(IAppointment other)
        {
 
            var task = other as Task;
 
            base.CopyFrom(other);
 
        }
    }
}

and XAML

<Window x:Class="Calendar.MainWindow"
        xmlns:schedule="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
        xmlns:scheduleView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <ControlTemplate x:Key="EditAppointmentTemplate" TargetType="scheduleView:SchedulerDialog">
            <Grid IsSharedSizeScope="True">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
 
                <telerik:RadToolBar x:Name="AppointmentToolbar"  BorderThickness="0 0 0 1" FocusManager.IsFocusScope="False"
                 GripVisibility="Collapsed" Grid.Row="0" Margin="-1 0 -1 3">
                    <telerik:RadButton x:Name="EditRecurrenceButton" Command="scheduleView:RadScheduleViewCommands.EditRecurrenceRule">
                        <ToolTipService.ToolTip>
                            <ToolTip telerik:LocalizationManager.ResourceKey="EditRecurrence"  />
                        </ToolTipService.ToolTip>
                        <TextBlock Margin="6 0" telerik:LocalizationManager.ResourceKey="EditRecurrence" />
                    </telerik:RadButton>
                    <telerik:RadToolBarSeparator />
                    <telerik:RadComboBox x:Name="PART_Categories" Margin="2 1" Width="130"  ItemsSource="{Binding ElementName=ScheduleView, Path=CategoriesSource}" DisplayMemberPath="{Binding CategoryName}" />
 
                </telerik:RadToolBar>
            </Grid>
        </ControlTemplate>
        <Style x:Key="EditAppointmentDialogStyle" TargetType="scheduleView:SchedulerDialog">
            <Setter Property="Width" Value="560" />
            <Setter Property="IsTabStop" Value="False" />
 
            <Setter Property="SnapsToDevicePixels" Value="True" />
 
            <Setter Property="Template" Value="{StaticResource EditAppointmentTemplate}" />
        </Style>
        
    </Window.Resources>
    <Grid>
        <telerik:RadScheduleView AppointmentsSource="{Binding Appointments}" EditAppointmentDialogStyle="{StaticResource EditAppointmentDialogStyle}"
                                      FirstVisibleTime="12:00" x:Name="ScheduleView" CategoriesSource="{Binding Categories}"
                                      ActiveViewDefinitionIndex="1">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition />
                <telerik:WeekViewDefinition />
                <telerik:MonthViewDefinition />
                <telerik:TimelineViewDefinition DayStartTime="00:00" />
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
    </Grid>
</Window>


If I removeEditAppointmentDialogStyle, I see mian Catigories. Can you help me?
Thank's
 
Zhenya Popkin
Top achievements
Rank 1
 asked on 12 Jul 2012
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?