|
Just a thought, have you debugged through this value change and see when it fires, handle the VM values from the change of the property.
IsChecked="{Binding Path=ChkBoxClickCommand}"
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Good Day All
i have an application that i use to test my example. i am creating a Cookie in Silverlight and access the Cookie in asp.net. In my example application works fine. The code for creating a Cookie is like this
private void SetCookies(string name, string value)
{
string code = string.Format("document.getElementById('myIFrame').contentWindow.SetCookie('{0}','{1}')", name, value);
HtmlPage.Window.Eval(code);
}
and in my Page load of the Silverlight Page i have this
HtmlElement iframe = (HtmlElement)radHtmlPlaceholder1.HtmlPresenter.Children[0];
iframe.SetAttribute("id", "myIFrame");
I am using it this way because i want to access a Cookie or a Value from Silverlight in asp.net. The Element "RadhtmlplaceHolder1" is a telerik control that is being used as described here [LINK]http://blogs.telerik.com/kirilstanoev/posts/11-05-10/reading_writing_cookies_with_htmlplaceholder_for_silverlight.aspx[/LINK]
i will not go to the aspx page where the Cookie is being accessed, but the problem comes when setting it in this line
HtmlPage.Window.Eval(code);
Attempted to read or write protected memory. This is often an indication that other memory is corrupt
Please note that this is on a SilverlightChild Window
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
<Window>
<Window.Resources>
<ContextMenu ... >
<Button Command={Binding ... } />
</ContextMenu>
</Window.Resources>
</Window>
I'm trying to bind the button command to a property in the window. Window.DataContext is set. I've also tried Binding ElementName=windowName, Path=propName, but no luck.
|
|
|
|
|
Yes, but keep in mind that an object in the Resources section isn't actually part of the logical tree, and hence, has nothing to bind to. ElementName bindings won't work either, in this situation.
If you use a StaticResource reference to pull it into the tree, then it can use its parent for the DataContext... Except ContextMenus don't go into the tree at all.
You might try binding the DataContext of the ContextMenu to its PlacementTarget, and make sure that's set when you display it. If that fails, you might have to hook the menu's events to set that, or set the DataContext directly, when it's opened.
|
|
|
|
|
Thanks for the info...
Yeah, I just looped through the items when I open the menu and set the Command properties there. Kind of cheezy, but oh well....
|
|
|
|
|
Hi,
How to identify/find that silverlight is installed in client browser from server side.
Regards
Bhavin
|
|
|
|
|
I don't think you can. It doesn't add anything to the user agent (at least it didn't used to), so the only way you could tell is by writing something that does a client side check and then reports this back to the server.
|
|
|
|
|
You would need to run some sort of a script on the client that informs the server if there is a version installed.
If you want to do this via silverlight, the silverlight client will need to communicate with a web service where the version can be a parameter.
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.
|
|
|
|
|
Hi all,
I am developing an image manipulation application using Silverlight 4.0.
I am using Nokola's adorner control to rotate image on canvas and its working perfectly.
But the problem is that after rotation when I merge this rotated image with my Main Image (that is on canvas and is an Image Control, and I am doing this with WritableBitmap),
it is not merging at what place it was rotated. I have searched a lot but no success.
I have linke that will explain more : http://stackoverflow.com/questions/581837/wpf-getting-new-coordinates-after-a-rotation[^], but still i am not able to do this...
Please help guys.
Thanx & Regards
Suresh
Be an Eagle, Sky is Yours.
|
|
|
|
|
I took a look at the link and it seemed to explain how to do exactly what you are trying to do - but you say you are not able to do this - I guess my question is, why not?
|
|
|
|
|
|
Is replying to this post with a link advertising?
What do you mean by 'multiple series on the Z axis'? Is that stacked bars?
|
|
|
|
|
Not sure...Im asking for it specificlly...So its not like your spamming..
|
|
|
|
|
The site which I am trying to direct you do is currently down ... I'll check in on it tomorrow.
|
|
|
|
|
Ok, it is back up. Check out http://www.sharpplot.com/[^]. This is a chart library for .Net, which means it should work for Silverlight, and it definitely does the type of chart you linked (it calls it a Tower chart).
It is not free but you said that was ok in the original question.
(Disclaimer: I am somewhat associated with this library, so it is not an unbiased piece of advice.)
|
|
|
|
|
I have a model in the WCF with properties, this is based on a view of PersonDB. This is then generated into the reference of the SL client and all works well.
I have implemented an EditablePerson in the VM that is a copy of the PersonDB and is created in the SelectedPerson change event. This works perfectly well as the shallow copy and reverse is done in the VMs base class.
I am looking at implementing IEditableObject on the PersonDB class from the WFC. The interface does not cross the reference barrier. I can create a partial class in the client Models.PersonDB with the Interface implemented but how do I convert WCF.PersonDB to Models.PersonDB.
All responses from the WCF return a List, do I need to foreach every List<> and copy it into a List<models.???db> or is there a better way. Refactoring will be a PITA
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
If you have a look at this article, you'll find a handy Memento[^] implementation that helps to encapsulate IEditableObject behaviour so that a lot of the hard work is removed.
|
|
|
|
|
I had actually seen and browsed that article and decided my own implementation had merit for it's simplicity. Mind you I don't handle dialogs just the editable functionality.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi all,
I started to work on with WPF few days back, and at the beginning I choose SAMS 24 hours book. It is almost finish now I'm looking to start another which is discussing about more advance stuff. So what you all recommended?
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
While some like wordy books (I've got tons of old ones), these days I prefer the nitty-gritty...
So when I started WPF I read (and studied the sample code in) the entire WPF SDK Documentation[^].
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
You do realise you just admitted, in public, that you read a manual?
-ve man-points!
|
|
|
|
|
|
Nobody will read this reply now it's an old thread, so I think I am safe in admitting that I followed the link in your original message, and am now ploughing through the documentation
In my youth I was usually the only oine whe ever read the documentation, and it was amazing all the tricks and tips I knew that astounded others - and back in those days we never said RTFM
|
|
|
|
|
I like to move with ebooks. So I can keep open the page on one screen and the IDE is on another. So I can tryout the samples and some R&D I want to do. I hate printed materials.
I'm referring the documentation in case of any, but wonder how could read and workout the complete. Its a loon journey I guess.
Anyway, thanks for the reply.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
It might be worthwhile to start building a sample application or two.
You can check out videos and tutorials on mdsn as well.
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.
|
|
|
|