Telerik Forums
UI for WPF Forum
2 answers
68 views
Hi

I'm using the latest released 1129 build.  Create a new document.

Add text such as

"Heading 1

Heading 2"

Highlight all, set to Heading 1 style.

Generate ToC.  This will not work.  The code throws an exception during InsertTableOfContentsCommand.PrepareExecuteCore(). 

This seems to be because empty paragraphs are skipped and no bookmark added to "paragraphToBookmark" dictionary, but the later foreach loop that iterates the paragraphs and gets bookmark names from this dictionary doesn't skip any paragraphs - so the empty ones will throw an exception, as they aren't in the dictionary.
Iva Toteva
Telerik team
 answered on 20 Dec 2012
2 answers
164 views
Hi

I need to select a carousel item by souble clicking it.

Once I have double clicked I need to know whcih Item I have clicked.

Do you have any examples of this ?

Kind Regards

David
Michael
Top achievements
Rank 1
 answered on 20 Dec 2012
1 answer
140 views
For developers using the Windows 8 theme and the TabControl, be aware that if you set the BackgroundVisibility to "Hidden", the background tabs will "disappear" visually. I'm not sure I'd consider it a bug because the system is just doing what you tell it to do, but it's something that we discovered and I thought I would pass along.

I've attached screenshots for reference.

Greg
Stefan
Telerik team
 answered on 20 Dec 2012
9 answers
228 views
RadMaskedNumericInput not working with ApplicationCommands.paste.

it will show ApplicationCommands.paste value but it is not preserved.

onkeypress or tab change, it will change to old value and new paste value will never updated.

I also used CommandBindings in constructor of RadMaskedNumericInput. but it doesn't work.

CommandBindings.Add(

 

new CommandBinding(ApplicationCommands.Paste, (sender, e) =>

{

double inputValue;

bool isInputNumber = double.TryParse(Clipboard.GetText(), out inputValue);

this.Value = inputValue;

e.Handled = true;

}));

Hitesh
Top achievements
Rank 1
 answered on 20 Dec 2012
5 answers
133 views
Hello,

i have a gridview with ShowInsertRow behavoir
Grid binded to ObservableCollection.

User clicked fixed New row.
i tried to add or delete rows to/from my observable collection in this time(grid is focused on fixed new Row, but user dont makes entries) and dont see any updates.
Yoan
Telerik team
 answered on 20 Dec 2012
1 answer
105 views
Our application MainWindow is derived from RadRibbonWindow, our dialogs and other popups are derived from RadWindow.

RadWindow applies theming to its non-client area, RadRibbonWindow ignores the current theme and has the stock Win7 Aero chrome. This inconsistency looks ridiculous. How do we get it so that it is consistent?

We can easily make it so that our dialogs do not have the themed non-client area by deriving them from Window instead of RadWindow, but then the selected theme is not applied by all of the dialog's controls which looks even worse.

What would you suggest?
Tina Stancheva
Telerik team
 answered on 20 Dec 2012
5 answers
132 views
Hi, I'm trying to drag XML elements from one RadTreeView (call it templateView) to another RadTreeView (contentView), and reordering of the XML elements in the contentView.
A drag operation from the templateView to the contentView should only be a copy operation; the templateView should never change its contents.

Looking through the documentation it appears that RadDragAndDropManager is not supported anymore, but if I look through the samples, for example the TreeView Drag And Drop sample in the WPF Control Example app (and in the examples included in the source), and even in the documentation (http://www.telerik.com/help/wpf/radtreeview-how-to-implement-drag-and-drop-between-treeview-and-other-controls.html), it seems the only samples are RadDragAndDropManager. And the DragAndDropManager samples I found are lacking some of the defining features of RadDragAndDropManager such as the insertion marker (above, inside and below).

So which of these frameworks should I go for? The supported one, without samples, or the unsupported one, with samples?
Nick
Telerik team
 answered on 20 Dec 2012
1 answer
201 views
I got exception - Parameter count mismatch on setting RadDataForm's currentItem if INotifyPropertyChanged has been implemented and an Indexer[e.g IDataErrorInfo has been implemented] is used in that that data source. Control version is : 2012.3.1129.40 [2012 Q3 SP1].

Message : Parameter count mismatch.

Here is details stack trace :
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)
   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)
   at Telerik.Windows.Data.ItemPropertyInfoExtensions.GetValue(ItemPropertyInfo itemProperty, Object item)
   at Telerik.Windows.Controls.RadDataForm.PopulatePropertiesInitialValues(Object currentItem)
   at Telerik.Windows.Controls.RadDataForm.OnCurrentItemChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
   at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   at System.Windows.Data.BindingExpression.Activate(Object item)
   at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
   at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
   at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
   at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.FrameworkElement.set_DataContext(Object value)
   at JerichoListsManagement.View.AddView.set_ViewModel(IViewModel value) in D:\JerichoLatest\src\GUI\WPF UI\Module\JerichoListsManagement\View\AddView.xaml.cs:line 19
   at JerichoListsManagement.ViewModel.PatientViewModel.ExecuteAddEntityCommand() in D:\JerichoLatest\src\GUI\WPF UI\Module\JerichoListsManagement\ViewModel\PatientViewModel.cs:line 108
   at Microsoft.Practices.Prism.Commands.DelegateCommand.<>c__DisplayClass6.<.ctor>b__2(Object o)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.Execute(Object parameter)
   at Microsoft.Practices.Prism.Commands.DelegateCommandBase.System.Windows.Input.ICommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at Telerik.Windows.Controls.RadButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   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.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   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)

 
Ivan Ivanov
Telerik team
 answered on 20 Dec 2012
1 answer
89 views
I have a user control which is just a RadGrid. But the grid is huge where it has 50 columns and for rows i guess not much but 100 rows  and the issue is the same for 20 rows. Where i change the main content or show and hide or drag out and drag it back in it takes a long time and makes pauses while docking or docking out. 


Is there any way i can reduce this pause or any workaround for this issue.
Miroslav Nedyalkov
Telerik team
 answered on 20 Dec 2012
1 answer
453 views
I'm encountering an exception when I call Application.Current.Shutdown in my app. The exception is:

Message
"Cannot set Visibility to Visible or call Show, ShowDialog, Close, or WindowInteropHelper.EnsureHandle while a Window is closing."

Stacktrace
at System.Windows.Window.VerifyNotClosing()
at System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)
at System.Windows.Window.Close()
at Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Close() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:line 54
at Telerik.Windows.Controls.WindowBase.CloseHostImidiately() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 1333
at Telerik.Windows.Controls.WindowBase.OnCloseAnimationFinished() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 1025
at Telerik.Windows.Controls.WindowBase.PlayCloseAnimation() in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 1318
at Telerik.Windows.Controls.WindowBase.TryClose(Boolean shouldCloseHost) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 719
at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IWindowDragAware.TryClose(Boolean shouldCloseHost) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\WindowBase.cs:line 612
at Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.OnWindowClosing(Object sender, CancelEventArgs e) in c:\TB\102\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\Window\InternalWindow\WindowWithNoChromeWindowHost.cs:line 277
at System.Windows.Window.OnClosing(CancelEventArgs e)
at System.Windows.Window.InternalClose(Boolean shutdown, Boolean ignoreCancel)

For what it's worth, this app uses Prism and this is a call made via an ICommand on the Shell's viewmodel. As such:

ShellViewModel.cs (snippet)
/// <summary>
/// Gets the exit command.
/// </summary>
public ICommand ExitCommand
{
    get
    {
        return new DelegateCommand(() =>
            {
                // If we can close, do so...
                if (this.CanClose)
                {
                    Application.Current.Shutdown();
                }
            });
    }
}

Without over-complicating matters, the CanClose property is implemented by each screen in the application and will raise a RadWindow dialog prompting for confirmation if there are changes on that screen. Based on our implementation, all of that prompting should be complete before the Application.Current.Shutdown is called so we're not sure what's happening and we can't seem to catch this exception anywhere. It feels like it might be a race condition, but we're not sure where.

Any ideas?

Greg
Vladi
Telerik team
 answered on 20 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?