RadWindow window = new RadWindow(); RadWindow window2 = new RadWindow(); RadWindow window3 = new RadWindow(); RadWindow window4 = new RadWindow(); public MainWindow() { InitializeComponent(); window.Header = "Window1"; window.Owner = Application.Current.MainWindow; window.CanClose = false; window2.Header = "Window2"; window2.Owner = Application.Current.MainWindow; window2.CanClose = false; window3.Header = "Window3"; window3.Owner = Application.Current.MainWindow; window3.CanClose = false; window4.Header = "Window4"; window4.Owner = Application.Current.MainWindow; window4.CanClose = false; this.Loaded += OnExampleLoaded; this.Unloaded += OnExampleUnloaded; }void OnExampleUnloaded(object sender, RoutedEventArgs e) { window.Close(); window2.Close(); window3.Close(); window4.Close(); } void OnExampleLoaded(object sender, RoutedEventArgs e) { double dblHeight = (this.ActualHeight / 2) - 15; double dblWidth = (this.ActualWidth / 2) - 20; window.Height = dblHeight; window.Width = dblWidth; window2.Height = dblHeight; window2.Width = dblWidth; window3.Height = dblHeight; window3.Width = dblWidth; window4.Height = dblHeight; window4.Width = dblWidth; window.Left = 10; window.Top = 34; window2.Left = dblWidth + 20; window2.Top = 34; window3.Left = 10; window3.Top = dblHeight + 44; window4.Left = dblWidth + 20; window4.Top = dblHeight + 44; window2.Content = new MyControl(); window.Show(); window2.Show(); window3.Show(); window4.Show(); }<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="ScoreBoard.MyControl" mc:Ignorable="d" Height="358.566" Width="391.232"> <Grid Margin="0,10,10,10"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="132*"/> <RowDefinition Height="133*"/> <RowDefinition Height="27*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <telerik:Label Content="Times" Margin="10,9,10,10" FontSize="36" FontWeight="Bold" HorizontalContentAlignment="Center" Grid.ColumnSpan="2"/> <telerik:RadCartesianChart x:Name="chartTimes1" Margin="10" Grid.Row="1" FontSize="11" FontWeight="Normal" > <telerik:RadCartesianChart.Behaviors> <telerik:ChartPanAndZoomBehavior PanMode="Both" ZoomMode="Both"/> </telerik:RadCartesianChart.Behaviors> </telerik:RadCartesianChart> <telerik:RadCartesianChart x:Name="chartTimes2" Margin="10" Grid.Row="2" FontSize="11" FontWeight="Normal" Grid.RowSpan="2" > <telerik:RadCartesianChart.Behaviors> <telerik:ChartPanAndZoomBehavior PanMode="Both" ZoomMode="Both"/> </telerik:RadCartesianChart.Behaviors> </telerik:RadCartesianChart> <telerik:RadCartesianChart Grid.Column="1" Margin="10" Grid.Row="1"> <telerik:RadCartesianChart.HorizontalAxis> <telerik:CategoricalAxis/> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis/> </telerik:RadCartesianChart.VerticalAxis> <telerik:BarSeries> <telerik:BarSeries.DataPoints> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="10" Value="10"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="20" Value="20"/> <telerik:CategoricalDataPoint Category="{x:Null}" IsSelected="False" Label="30" Value="30"/> </telerik:BarSeries.DataPoints> </telerik:BarSeries> </telerik:RadCartesianChart> </Grid></UserControl>System.NullReferenceException wurde nicht behandelt.
HResult=-2147467261
Message=Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Source=Telerik.Windows.Controls.Navigation
StackTrace:
bei Telerik.Windows.Controls.RadBook.OnCurrentSheetIndexChanged(Int32 newValue, Int32 oldValue) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Book\RadBook.cs:Zeile 1302.
bei Telerik.Windows.Controls.RadBook.set_CurrentSheetIndex(Int32 value) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Book\RadBook.cs:Zeile 528.
bei Telerik.Windows.Controls.RadBook.OnRightPageIndexChanged(Int32 rightPageIndex) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Book\RadBook.cs:Zeile 2274.
bei Telerik.Windows.Controls.RadBook.OnRightPageIndexPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Book\RadBook.cs:Zeile 1195.
bei System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
bei System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
bei System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
bei System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
bei System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
bei Telerik.Windows.Controls.RadBook.set_RightPageIndex(Int32 value) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Book\RadBook.cs:Zeile 353.
bei Telerik.Windows.Controls.RadBook.NavigateToPage(PageToNavigateTo pageToNavigateTo) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Book\RadBook.cs:Zeile 2240.
bei Telerik.Windows.Controls.RadBook.FirstPage() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Book\RadBook.cs:Zeile 616.
bei Telerik.Windows.Controls.Book.BookPagedCollectionView.MoveToFirstPage() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Book\BookPagedCollectionView.cs:Zeile 143.
bei Telerik.Windows.Controls.Data.DataPager.DataPagerViewModel.MoveToFirstPage() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\DataPager\DataPagerViewModel.cs:Zeile 183.
bei Telerik.Windows.Controls.RadDataPager.<>c__DisplayClass1.<MoveToPage>b__0(Int32 i) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\DataPager\RadDataPager.cs:Zeile 940.
bei Telerik.Windows.Controls.RadDataPager.MoveToPage(Int32 pageIndex, Func`2 pageMoveOperation) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\DataPager\RadDataPager.cs:Zeile 972.
bei Telerik.Windows.Controls.RadDataPager.MoveToPage(Int32 pageIndex, Func`1 pageMoveOperation) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\DataPager\RadDataPager.cs:Zeile 940.
bei Telerik.Windows.Controls.RadDataPager.MoveToFirstPage() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\DataPager\RadDataPager.cs:Zeile 841.
bei Telerik.Windows.Controls.RadDataPager.OnMoveToFirstPage(Object sender, ExecutedRoutedEventArgs e) in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Controls\Data\DataPager\RadDataPager.Commands.cs:Zeile 52.
bei System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
bei System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)
bei System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
bei System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)
bei System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)
bei System.Windows.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
bei System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
bei System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
bei System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
bei MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
bei System.Windows.Controls.Primitives.ButtonBase.OnClick()
bei System.Windows.Controls.Button.OnClick()
bei Telerik.Windows.Controls.RadButton.OnClick() in c:\TB\221\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Buttons\RadButton.cs:Zeile 398.
bei System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
bei System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
bei System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
bei System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
bei System.Windows.Input.InputManager.ProcessStagingArea()
bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
bei System.Windows.Threading.Dispatcher.Run()
bei System.Windows.Application.RunDispatcher(Object ignore)
bei System.Windows.Application.RunInternal(Window window)
bei System.Windows.Application.Run(Window window)
bei System.Windows.Application.Run()
bei FuelOPTBA20.App.Main() in c:\Projects\GIT\FuelOPTBA20\FuelOPTBA20\obj\x86\Debug\App.g.cs:Zeile 0.
bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Threading.ThreadHelper.ThreadStart()
InnerException:
Hello,
We want to be able to block a row change when a user is editing a row and clicks on a different row in the RadGridView.
We have noticed that the RowValidating, RowValidated and RowEndEdit events are fired before the SelectionChanging event. This sounds logical but how can we see in RowValidating that the event is fired due to selecting an different row?
Kind regards,
Bert
Hello Telerik,
I updated my WPF project in VS 2012 with the Solution Update Wizard to 2013 Q2, since I get an exception when I open a .xaml file in the in VS which contains a RadGridView.
Greetings Uwe
How to show hotkey in right part of menu item for RadMenuItem? Or how to add MenuItem to RadContextMenu? MenuItem wraps into RadMenuItem and looks ugly (I don't want to change HeaderTemplate because I think RadContextMenu should have better functionality than free analogs):
<t:RadContextMenu>
<t:RadContextMenu.Items>
<MenuItem Header="Copy" Command="Copy" />
<t:RadMenuItem Header="Copy" Command="Copy" />
</t:RadContextMenu.Items>
</t:RadContextMenu>