Click here to Skip to main content
15,886,061 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: From WinForms to WPF and XAML problem with properties (not Dependency)... Pin
Pete O'Hanlon25-Oct-12 3:32
mvePete O'Hanlon25-Oct-12 3:32 
GeneralRe: From WinForms to WPF and XAML problem with properties (not Dependency)... Pin
User 224816825-Oct-12 3:58
User 224816825-Oct-12 3:58 
GeneralRe: From WinForms to WPF and XAML problem with properties (not Dependency)... Pin
Pete O'Hanlon25-Oct-12 4:33
mvePete O'Hanlon25-Oct-12 4:33 
GeneralRe: From WinForms to WPF and XAML problem with properties (not Dependency)... Pin
User 224816825-Oct-12 22:03
User 224816825-Oct-12 22:03 
GeneralRe: From WinForms to WPF and XAML problem with properties (not Dependency)... Pin
Pete O'Hanlon25-Oct-12 22:09
mvePete O'Hanlon25-Oct-12 22:09 
GeneralRe: From WinForms to WPF and XAML problem with properties (not Dependency)... Pin
User 224816825-Oct-12 22:35
User 224816825-Oct-12 22:35 
AnswerRe: From WinForms to WPF and XAML problem with properties (not Dependency)... Pin
User 224816825-Oct-12 4:00
User 224816825-Oct-12 4:00 
AnswerRe: From WinForms to WPF and XAML problem with properties (not Dependency)... Pin
User 224816829-Oct-12 22:59
User 224816829-Oct-12 22:59 
I changed the view property and the X axis list to dependency properties but no luck. Then I created a new class (XAxes) that implements IList<axisx> and IList (and replaced the List<axisx> property in the view class with that) so I could debug if accessing the X axis list doesn't work. Didn't see anything wrong with that. But when I add two X axes in addition to the already created X axis this exception pops out in designer: http://postimage.org/image/8an21q0jr/[^]

Here's the whole stack trace:
System.ArgumentOutOfRangeException
Specified argument was out of the range of valid values.
Parameter name: index
   at MS.Internal.VirtualModel.VirtualModelItemCollection.Insert(Int32 index, IVirtualModelItem item)
   at MS.Internal.VirtualModel.VirtualModelItemCollection.Insert(Int32 index, Object value)
   at MS.Internal.Designer.PropertyEditing.Model.Properties.ModelItemCollectionAggregate.<>c__DisplayClassc.<Insert>b__8(ChangeEntry change, Int32 i)
   at MS.Internal.Designer.PropertyEditing.Model.Properties.ModelItemCollectionAggregate.ManageCollections(SetupDelegate setup, IterationDelegate iterate, NotifyChangeDelegate notifyChange, ReturnValueDelegate returnValue)
   at MS.Internal.Designer.PropertyEditing.Model.Properties.ModelItemCollectionAggregate.Insert(Object value, Int32 index)
   at MS.Internal.Designer.PropertyEditing.Model.Properties.ModelPropertyValueCollection.Insert(Object value, Int32 index)
   at MS.Internal.Designer.PropertyEditing.FromExpression.Framework.PropertyInspector.CollectionDialogEditor.AddItem()
   at MS.Internal.Designer.PropertyEditing.FromExpression.Framework.PropertyInspector.CollectionDialogEditor.OnQuickTypesCurrentChanged(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Data.CollectionView.OnCurrentChanged()
   at System.Windows.Data.ListCollectionView.MoveCurrentToPosition(Int32 position)
   at System.Windows.Data.CollectionView.MoveCurrentTo(Object item)
   at MS.Internal.Designer.PropertyEditing.Editors.CollectionDialogEditor.OnAddNewItem(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.UIElement.OnExecutedThunk(Object sender, ExecutedRoutedEventArgs e)
   at System.Windows.Input.ExecutedRoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object target)
   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.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)
   at System.Windows.Input.RoutedCommand.ExecuteCore(Object parameter, IInputElement target, Boolean userInitiated)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.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)

Something pretty weird is going on when inserting elements to the list. Well, I'm out of ideas. I'm probably going to have to tell people not to use XAML code or designer in WPF until this problem is solved. Put "[Browsable(false)]" on every property or something...

modified 15-Dec-21 21:01pm.

QuestionCollectionViewSource filteration Pin
Member 787462222-Oct-12 22:57
Member 787462222-Oct-12 22:57 
AnswerRe: CollectionViewSource filteration Pin
Mycroft Holmes23-Oct-12 0:38
professionalMycroft Holmes23-Oct-12 0:38 
QuestionTrouble decoding an image Pin
MitchG92_2422-Oct-12 22:56
MitchG92_2422-Oct-12 22:56 
AnswerRe: Trouble decoding an image Pin
Bernhard Hiller26-Oct-12 2:33
Bernhard Hiller26-Oct-12 2:33 
GeneralRe: Trouble decoding an image Pin
MitchG92_2429-Oct-12 4:11
MitchG92_2429-Oct-12 4:11 
QuestionHow does Wcf Ria Services connect Access? Pin
Apocalypse Now21-Oct-12 22:42
Apocalypse Now21-Oct-12 22:42 
QuestionMVVM & Collections of Collections Pin
cjb11021-Oct-12 22:13
cjb11021-Oct-12 22:13 
AnswerRe: MVVM & Collections of Collections Pin
SledgeHammer0122-Oct-12 9:44
SledgeHammer0122-Oct-12 9:44 
GeneralRe: MVVM & Collections of Collections Pin
cjb11022-Oct-12 22:01
cjb11022-Oct-12 22:01 
GeneralRe: MVVM & Collections of Collections Pin
SledgeHammer0123-Oct-12 6:34
SledgeHammer0123-Oct-12 6:34 
QuestionSilverlight on Linux(Ubuntu) Pin
anil03318-Oct-12 4:39
anil03318-Oct-12 4:39 
AnswerRe: Silverlight on Linux(Ubuntu) Pin
Mycroft Holmes18-Oct-12 17:18
professionalMycroft Holmes18-Oct-12 17:18 
GeneralRe: Silverlight on Linux(Ubuntu) Pin
ThatsAlok19-Oct-12 2:07
ThatsAlok19-Oct-12 2:07 
GeneralRe: Silverlight on Linux(Ubuntu) Pin
Mycroft Holmes19-Oct-12 13:31
professionalMycroft Holmes19-Oct-12 13:31 
AnswerRe: Silverlight on Linux(Ubuntu) Pin
ThatsAlok21-Oct-12 1:52
ThatsAlok21-Oct-12 1:52 
GeneralRe: Silverlight on Linux(Ubuntu) Pin
trønderen12-Dec-12 11:50
trønderen12-Dec-12 11:50 
GeneralRe: Silverlight on Linux(Ubuntu) Pin
Mycroft Holmes12-Dec-12 13:19
professionalMycroft Holmes12-Dec-12 13:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.