|
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.
|
|
|
|
|
Silverlight is another about-to-be-abandoned microsoft technology that we've all be coerced into developing for u ntil it's replace with something "better".
.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
|
|
|
|
|
Atleast you should have searched in Search engines first. Ok i got this[^] as first link in google search.
|
|
|
|
|
I define some style on some button.
The style supposed to change the button bitmap in 'mouse over'.
The problem is that there are two scenario with 4 different bitmap => that mean
Scenario 1: the original bitmap is B1 and in 'mouse over' it need to be change to B2
Scenario 2: the original bitmap is C1 and in 'mouse over' it need to be change to C2
Those two scenario need to be on same button.
In my implementation the original & 'mouse over' bitmaps are hard coded - and i don't now how to change it in the xaml.
I mean that i need some 'if' condition in the xaml that will know if I'm run on Scenario 1 or Scenario 2. . .
How can i do it ?
Thanks for any help.
|
|
|
|
|
This answer may be simplistic as I am only recent to Silverlight but:
XAML has no decision making capability, that all needs to be done in the code behind the View or the ViewModel. So you need a property that exposes the image for the control to bind to and you need an event where you can manage the value of the property. You know the event, now write a handler and a property.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks,
But is there a any option to look some variable value from the xaml ?
The last thing that i want to do is to change the bitmaps thru the code ....
|
|
|
|
|
Your bitmaps are either a resource or file so you are not changing them, you need to change which file is displayed due to some conditions, the interpreting of the conditions cannot live in the xaml, no processing! So I think you have little choice.
However I would not base a decision on this advice alone - I can't guarantee that I'm correct! Wait for some more feedback.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Lookup the ValueConverter object.
.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 am having an issue binding a command to a user control. My main window calls a workspace viewmodel that supplies data via observable collection to a datagrid in the workspace viewmodel. In this datagrid I put a button, but am having an issue figuring out how to bind a command to it.
The datagrid itemssource is an observable collection from a viewmodel. I have a command on that same view model that tells the datagrid what to do when a button field is pressed. I bound to that name but it isn't working because. I am guessing this is because the datagrid (Which is on a user control) is bound to the observable collection of data and the command is outside the scope of that collection.
So on what viewmodel do I put my command in order to execute it on my usercontrol and how to I reference it on my user control?
Sorry for the vagueness of it all, this is a bit difficult to explain.
Cheers, --EA
|
|
|
|