Telerik Forums
UI for WPF Forum
3 answers
272 views
We are migrating from Scheduler to ScheduleView because of performance issues with the Scheduler control. Searching online for help on migration didn't return anything useful. So I was trying to see if anyone else had went through this migration and if they can share their experience.

We use the Scheduler control heavily with many of its APIs and seems like many of them are not available in ScheduleView.

Sample code using Scheduler is listed below.
<telerikScheduler:RadScheduler
    ActiveViewDefinitionChanged="scheduler_ActiveViewDefinitionChanged"
    AvailableViewModes="Day, Week, Month"
    AppointmentTemplate="{StaticResource AppointmentTemplate}"
    EditAppointmentDialogStyle="{StaticResource EditDialogStyle}"
    AppointmentTemplateSelector="{StaticResource AppointmentTemplateSelector}"
    SelectedViewStartDateChanged="scheduler_SelectedViewStartDateChanged"
    x:Name="scheduler"
    AppointmentsSource="{Binding Appointments}"
    HorizontalContentAlignment="Stretch"
    OpenModalDialogs="True"
    ViewMode="Day"
    AllDayAreaHeight="0"
    GroupBy="{Binding Path=GroupBy}"
    Margin="0,0,3,0"
    RecurrenceChoiceDialogDefaultRecurrenceMode="Occurrence"
    ShowsConfirmationWindowOnDelete="False"
    MouseRightButtonUp="scheduler_MouseRightButtonUp"
    Style="{StaticResource RadSchedulerStyle}">
    <telerikScheduler:RadScheduler.DayViewDefinition>
        <telerikScheduler:DayViewDefinition
            VisibleDays="1"
            LargeChangeInterval="1d" />
    </telerikScheduler:RadScheduler.DayViewDefinition>
    <telerikScheduler:RadScheduler.WeekViewDefinition>
        <telerikScheduler:WeekViewDefinition
            VisibleDays="7"
            LargeChangeInterval="7d" />
    </telerikScheduler:RadScheduler.WeekViewDefinition>
    <telerikScheduler:RadScheduler.MonthViewDefinition>
        <telerikScheduler:MonthViewDefinition
            VisibleDays="42"
            TimeSlotLength="1"
            SmallChangeInterval="7d"
            LargeChangeInterval="1m" />
    </telerikScheduler:RadScheduler.MonthViewDefinition>
    <telerikScheduler:RadScheduler.ResourceStyleMappings>
        <telerikScheduler:ResourceStyleMapping
            ResourceType="Zones"
            ResourceName="{}"
            HeaderTemplate="{StaticResource ZoneHeaderTemplate}" />
    </telerikScheduler:RadScheduler.ResourceStyleMappings>
</telerikScheduler:RadScheduler>

Thanks!
Yana
Telerik team
 answered on 27 May 2011
6 answers
149 views

Hi,
 i have this sample code:
  RadPane formRadPane = new RadPane() { Header = "Not Document Pane", CanDockInDocumentHost = false };
            Canvas cReference = new Canvas();
            Image imgBg = new Image(new uri("Images/0.png"));
            imgBg.Width = 2000;
            imgBg.Height = 1980;
            cReference.childer.Add(imgBg);

            TextBlock txtBlock = new TextBlock();
            txtBlock.Text = "This Pane Cannot be docked in to document host";
            Canvas.SetLeft(txtBlock, 20);
            Canvas.SetTop(txtBlock, 20);
            cReference.childer.Add(txtBlock);

            FormRadPane.Content = cReference; 

when program run , the cReference's content Uncontrolled by formRadPane .that means cReference's content exceeds window area B.
How do I resolve this problem?

Per
Top achievements
Rank 1
 answered on 27 May 2011
1 answer
156 views
I have a RadNumericUpDown control, with default value of 0.00; but I would like to do the following: when the user clicks in it: the cursor position is placed at the beginning and when the user types, it overwrites the value.  

Can this be achieved?

EDIT: in fact what I want is to put the RadNumericUpDown in overwrite mode. Can this be done?

EDIT 2: for now I found this workaround,which puts it in overwrite model:

        private bool _lengthInputInsertActivated = false;
        private void LengthNumericUpDown_GotFocus(object sender, RoutedEventArgs e)
        {
            if (!_lengthInputInsertActivated)
            {
                KeyEventArgs e1 = new KeyEventArgs(Keyboard.PrimaryDevice, Keyboard.PrimaryDevice.ActiveSource, 0, Key.Insert);
                e1.RoutedEvent = Keyboard.KeyDownEvent;
                InputManager.Current.ProcessInput(e1);
                _lengthInputInsertActivated = true;
            }
        }
Konstantina
Telerik team
 answered on 27 May 2011
1 answer
106 views
I found an issue in http://www.telerik.com/community/forums/silverlight/scheduleview/scheduleview-throws-an-error-when-cancel-create-new-appointment.aspx and have a similar issue when i cancel a createnew in the appointmentcreating event by setting e.cancel = true when there are no appointments in the obseverablecollection of a custom appointment type. I tried creating a sample app with as close to the scenario I could and it did not get the exception. I get the below exception any guidance would be greatly appreciated. This the WPF ScheduleView. 

System.ArgumentOutOfRangeException was unhandled
  Message=Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  Source=mscorlib
  ParamName=index
  StackTrace:
       at System.Collections.ArrayList.get_Item(Int32 index)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
       at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.ListCollectionView.CancelNew()
       at Telerik.Windows.Controls.ScheduleView.ScheduleViewDataConnection.HackCollectionViewBug(Boolean isCommit)
       at Telerik.Windows.Controls.ScheduleView.ScheduleViewDataConnection.CancelNew()
       at Telerik.Windows.Controls.ScheduleViewBase.CreateNew(Slot slot)
       at Telerik.Windows.Controls.ScheduleViewBase.CreateAppointmentWithDialog(Object parameter)
       at Telerik.Windows.Controls.ScheduleViewBase.OnCreateAppointmentExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
       at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
       at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
       at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)
       at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunInternal(Window window)
       at OakLeaf.MM.Main.WPF.mmApplicationWrapper.OnStartup(StartupEventArgs eventArgs)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at DSN.Exec.WPF.MainEntry.Main(String[] args) in E:\Visual Studio TFS\Projects\DSN Exec Software\DSN Exec Software\DSN WPF\MainEntry.cs:line 106
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 
Konstantina
Telerik team
 answered on 27 May 2011
1 answer
141 views
Hi.

The user changed the calenderview / selecteddate
Sample:
today = 2011.05.20
user changed to 2009.01.02

In my Button i set the current date:
calendar.SelectedDate = Datetime.ToDay;

Before i do this:
if (calendar.DisplayMode != Telerik.Windows.Controls.Calendar.DisplayMode.MonthView )
{
    calendar.DisplayMode = DisplayMode.MonthView;
}



But the calnder doesn´t show the correctly date!
Why?


   







Reinhard
Yana
Telerik team
 answered on 27 May 2011
2 answers
179 views
If a GridView has a selection mode of Extended, is there a way to allow selection of rows by clicking on the selected row and dragging the mouse? if you click on a selected row and drag the mouse, no other rows get highlighted.
Sean 2212
Top achievements
Rank 1
 answered on 27 May 2011
1 answer
139 views
Hi,

I have the following structure in my application:
RadOutlookBar
    -RadOutlookBarItem
        -RadPanelBar
            -RadPanelBarItem
                -RadTreeView (with Items)

So, a RadOutlookBar with a RadOutlookBarItem contains a RadPanelBar with RadPanelBarItems. The RadPanelBarItem contains a RadTreeView with RadTreeViewItems.

In the RadTreeView is also a RadContextMenu.

When I right-clicked on a TreeViewItem of the TreeView, the ContextMenus opened-event is fired and ContextMenu.GetClickedElement<RadTreeViewItem>(); will return the right RadTreeViewItem. Then I click on a MenuItem and the ItemClick-event is fired. So far, so good.

Well when I do this a second time, the ContextMenu.GetClickedElement<RadTreeViewItem>(); returns the RadPanelBarItem which contains the TreeView.
As I see the RadPanelBarItem inherits from the RadTreeViewItem and the documentation says, GetClickedElement<T>() will return the top-most element of T. I think this is an incorrect behavior, because it returns two different elements and the second time the top-most element of T.
The error occurs, when at the first time the ItemClick-event of the ContextMenu was fired, after a MenuItem was clicked.

Got it?

GetClickedElement<T>() should always return the last element (the innermost) of T or am I wrong?

Thanks,
Daniel
Hristo
Telerik team
 answered on 27 May 2011
1 answer
128 views
Hello

I have a ControlTemplate where I want to bind the datacontent.

<Button Content="Button" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75">
    <Button.Template>
        <ControlTemplate>
            <StackPanel>
                <telerik:RadComboBox ItemsSource="{Binding ListCombo, Mode=OneWay}"  
                    Text="{Binding Filter.SelectedText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEditable="True"  
                    IsSynchronizedWithCurrentItem="True" IsFilteringEnabled="True"  Margin="0,0,0,81" />
            </StackPanel>
        </ControlTemplate>
    </Button.Template>
</Button>








 
Now it doesn't work properly but if I use only the control like below it work properly:

<telerik:RadComboBox ItemsSource="{Binding ListCombo, Mode=OneWay}"  
      Text="{Binding Filter.SelectedText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEditable="True"  
       IsSynchronizedWithCurrentItem="True" IsFilteringEnabled="True" Margin="0,0,0,81" />

 

What can I do to use it into a controltemplate?

Thanks in advance,

Pana
Telerik team
 answered on 27 May 2011
4 answers
336 views
Hi there,

I created a custom filter control as user control in my WPF application. I have a button in my MainWindows.xaml which clear all filters programatically for GridView. Everything works fine. when i click on button, it clear all filters and load grid data again, but it didn't clear filter's appearance in GridView. can you please suggest me how should i change appearance of filters in GridView when click on button?
kalpesh
Top achievements
Rank 1
 answered on 26 May 2011
21 answers
308 views
Floating panes doe not move smoothly when I move them around with the mouse. They jerk about 1cm at a time.
The complete WPF Window moves smoothly.

This problem only occurs on my desktop PC not on my far less powerful notebook.


Using: WPF40_2010_2_0812
Gregory
Top achievements
Rank 1
 answered on 26 May 2011
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
PersistenceFramework
DataPager
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?