|
Canvas.SetZIndex(yourControl, newValue);
It's there... Just moved.
|
|
|
|
|
That exactly what i did - but its not work.
|
|
|
|
|
What exactly are you trying to do? You can't move a control behind its parent, if that's what you're trying. You can only shuffle the order of controls in the same container.
Positive/higher values move it to the front, negative/lower values move it to the back. The default for all controls is zero.
|
|
|
|
|
The solution given by Ian is the perfect one.
However, as an alternative you could try the "old solution" of hiding / showing controls as per your requirements.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
I know that this is how i need to do it - but i don't know why its not working
Yes, I change the parent visibility - and i don't know how to recover from this situation .. ( or how to shuffle the order of controls back )
|
|
|
|
|
Yanshof wrote: Yes, I change the parent visibility - and i don't know how to recover from this situation .. ( or how to shuffle the order of controls back )
Hide one and show the other - and then hide the other show the first one.
This should work, unless these controls are contained one inside the other.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
This is not working also.
The winform usercontrol is stay on the top of all the other WPF controls.
I try to show/hide this control, change his z-order, and nothing happened.
If i call 'hide' to this control => its really hide it - but this control need to be on z-order specific - so i must find any other solution.
This can be Microsoft bug ?
|
|
|
|
|
Weird. You might want to paste some of your code here so that someone can help you.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Ahh, you never mentioned that your UserControl was a Winforms one... That's your problem right there...
"In a WPF user interface, you can change the z-order of elements to control overlapping behavior. A hosted Windows Forms control is drawn in a separate HWND, so it is always drawn on top of WPF elements."
-- http://msdn.microsoft.com/en-us/library/ms744952.aspx[^]
|
|
|
|
|
First ... Thanks
Second ... I said it in my first question that its winform.
|
|
|
|
|
Yanshof wrote: Second ... I said it in my first question that its winform.
"How to change border or userControl z-order in runtime ?
I dont find any way to do it
Someone can help me here ?"
Nope... You didn't... Kind of an important factoid
EDIT: No big deal, really... Just glad we got to the bottom of this
|
|
|
|
|
i am beginner in silverlight.I am facing one problem at the development time in Vs2008.whenever i am making any new application.first time i am able to see my UI design at the development also but second time it is crashing.
and every time it is giving error.plz any one help me.
Error is--->
Click here to reload the designer
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at MS.Internal.XcpImports.RenderTargetBitmapRenderNative(IntPtr nativePtr, IntPtr element, Int32& dirtyX, Int32& dirtyY, Int32& dirtyWidth, Int32& dirtyHeight)
at MS.Internal.XcpImports.RenderTargetBitmapRender(HostingRenderTargetBitmap bitmap, UIElement visual, Int32& dirtyX, Int32& dirtyY, Int32& dirtyWidth, Int32& dirtyHeight)
at System.Windows.Interop.HostingRenderTargetBitmap.Render(UIElement visual)
at MS.Internal.Silverlight.Host.RuntimeInterop.RenderElementToTargetBitmap(Int32 elementKey, Int32 targetBitmapIdentifier)
at MS.Internal.Silverlight.Host.Interop.RenderElementToTargetBitmap(Int32 element, Int32 targetBitmapIdentifier, ISilverlightContentDownloadCallback urlcallback)
at MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.UpdateBitmap()
at MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.UpdateTree()
at MS.Internal.Silverlight.Host.CiderSilverlightImageHost.CiderInternalImage.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Silverlight.Host.CiderSilverlightImageHost.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
|
|
|
|
|
The VS2008 designer was particularly prone to crashing when displaying the designer, especially if your XAML referred to a resource that needed to be recompiled. Try rebuilding the application and seeing if the designer shows the window - if it doesn't it means that the designer thinks that your XAML is invalid.
|
|
|
|
|
He's working on a silverlight app. There is no designer for silverlight in vs2008...
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Are you sure? I could have sworn I was using the Silverlight Designer Addin for Visual Studio 2008.
|
|
|
|
|
I know there isn't one in VS2008 as installed from the original mdeia, and I wasn't aware that an add-in even existed.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
It was available from the Silverlight site. I've tracked it down (for SL3) to here[^].
|
|
|
|
|
I don't know if I want to use it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
I know that I don't want to use it.
|
|
|
|
|
|
What is Google? Try this[^] answer.
|
|
|
|
|
i know google but i want to just basic example in silverling
|
|
|
|
|
That's not what you asked. If you know google, then search for basic example silverlight - there should be plenty of hits there to get you started. Alternatively you could always, and here's a really wild thought, buy a book or two. My good friend Laurent Bugnion has written an excellent book[^] on Silverlight development.
|
|
|
|
|
What is the difference between an orange?
I love riddles.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
You need to get a book on Silverlight and read it.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|