This is a migrated thread and some comments may be shown as answers.

Hide View button?

6 Answers 236 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 25 Jan 2011, 04:52 PM
We're only using the DayViewDefinition in our implementation so there is only one button "Day".  Is there any way to hide this button since it isn't needed?

Thanks,
Greg

6 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 26 Jan 2011, 03:16 PM
Hi Greg,

Thank you for contacting us.

There are several options to achieve this:
1. Set the NavigationHeaderVisibility property to False, that will remove the whole row.
2. If you set only the ActiveViewDefinition to DayViewDefinition, without setting the ViewDefinitions.
3. You can create a custom theme and remove the buttons from the style at all. You can find more information how to create a custom theme in this KB article: http://www.telerik.com/support/kb/wpf/scheduler/how-to-implement-a-new-custom-theme-in-a-few-steps.aspx

Hope this information helps. Please let us know if you need further assistance.

Kind regards,
Konstantina
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Greg
Top achievements
Rank 1
answered on 26 Jan 2011, 03:54 PM
Neither of those suggestions would be a good fit at this time.  So, what I ended up doing is 

    Private Sub SchedulingCalendar_Loaded(ByVal sender As ObjectByVal e As System.Windows.RoutedEventArgsHandles Me.Loaded
        'this will find the listbox that holds the buttons for changing between day, week, and month view and hide it since
        'we're only showing day
        ScheduleView.FindChildByType(Of ListBox)().Visibility = Windows.Visibility.Collapsed
    End Sub
0
Valeri Hristov
Telerik team
answered on 26 Jan 2011, 03:58 PM
Hello Greg,

Why the second suggestion does not work for you? Generally I would strongly recommend avoiding FindChildByType and similar methods because of possible performance implications.

Kind regards,
Valeri Hristov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Greg
Top achievements
Rank 1
answered on 26 Jan 2011, 04:04 PM
Maybe the second suggestion will work if you have an answer as to how I would set the following properties without using the DayViewDefinition.

<telerik:DayViewDefinition FirstDayOfWeek="Monday" MinorTickLength="15min" GroupFilter="{Binding GroupFilter}" DayStartTime="8:00:00" DayEndTime="17:00:00" />
0
Accepted
Valeri Hristov
Telerik team
answered on 26 Jan 2011, 04:08 PM
Hello Greg,

You could set the properties on the DayViewDefinition:
<telerik:RadScheduleView>
    <telerik:RadScheduleView.ActiveViewDefinition>
        <telerik:DayViewDefinition FirstDayOfWeek="Monday" ... />
    </telerik:RadScheduleView.ActiveViewDefinition>
</telerik:RadScheduleView>

this is instead of the usual code that will display the navigation buttons:
<telerik:RadScheduleView>
    <telerik:RadScheduleView.ViewDefinitions>
        <telerik:DayViewDefinition FirstDayOfWeek="Monday" ... />
    </telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>

All the best,
Valeri Hristov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Greg
Top achievements
Rank 1
answered on 26 Jan 2011, 04:14 PM
Awesome!  Works like a champ!

Thanks,
Greg
Tags
ScheduleView
Asked by
Greg
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Greg
Top achievements
Rank 1
Valeri Hristov
Telerik team
Share this question
or