Skip to content

Bugfixes in windows phone user control and samples#102

Closed
jjchiw wants to merge 2 commits intoRedth:masterfrom
jjchiw:master
Closed

Bugfixes in windows phone user control and samples#102
jjchiw wants to merge 2 commits intoRedth:masterfrom
jjchiw:master

Conversation

@jjchiw
Copy link
Copy Markdown

@jjchiw jjchiw commented Apr 9, 2014

In the sample project when you try to enter for second time in the custom layout there was an exception, because the custom layer is never detached from the previous ScanPage.xaml

this was the exception

'gridCustomOverlay.Children.Add(CustomOverlay)' threw an exception of type 'System.InvalidOperationException' base: {System.InvalidOperationException: Element is already the child of another element.
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value)
at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value)
at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject
value)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement
value)
at System.Windows.PresentationFrameworkCollection`1.Add(T value)}

In the sample.

The action to the buttons (cancel and torch) of the custom layer were only added once, because the buttons where already wired with an action.

All the events in ScanPage are set to null when it's navigated from the
page, because the Events are static and we were adding action everytime
we navigated to the page

jjchiw added 2 commits April 9, 2014 13:01
In the sample project when you try to enter for second time in the
custom layout there was an exception, because the custom layer is never
detached from the previous ScanPage.xaml

this was the exception
'gridCustomOverlay.Children.Add(CustomOverlay)' threw an exception of
type 'System.InvalidOperationException'
base: {System.InvalidOperationException: Element is already the child of
another element.
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at
MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1
collection, CValue value)
at
MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1
collection, DependencyObject value)
at
System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject
value)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement
value)
at System.Windows.PresentationFrameworkCollection`1.Add(T value)}

The action to the buttons (cancel and torch) of the custom layer were
only added once, because the buttons where already wired with an action.

All the events in ScanPage are set to null when it's navigated from the
page, because the Events are static and we were adding action everytime
we navigated to the page
@Redth
Copy link
Copy Markdown
Owner

Redth commented Apr 10, 2014

Thanks I'll take a look at this soon!

@Redth Redth added the bug label Apr 10, 2014
Redth added a commit that referenced this pull request Apr 14, 2014
@Redth
Copy link
Copy Markdown
Owner

Redth commented Apr 14, 2014

I've manually merged these suggestions, thanks again :)

@Redth Redth closed this Apr 14, 2014
@jjchiw
Copy link
Copy Markdown
Author

jjchiw commented Apr 14, 2014

Great!........I'm glad to contribute.

Cheers!

On Mon, Apr 14, 2014 at 4:28 PM, Jon Dick notifications@github.com wrote:

I've manually merged these suggestions, thanks again :)


Reply to this email directly or view it on GitHubhttps://github.com//pull/102#issuecomment-40371615
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants