silverlight

Silverlight is completely buggy with canvas

╄→гoц情女王★ 提交于 2019-12-24 10:15:17
问题 It's incredible that such sample code doesn't even work. I have put this inside grid but I can't see any line (code taken from MSDN in fact): <Canvas Height="103" HorizontalAlignment="Left" Margin="30,166,0,0" Name="canvas1" VerticalAlignment="Top" Width="180"> <Line X1="0" Y1="10" X2="5" Y2="10" Stroke="Black" StrokeThickness="4" /> </Canvas> This is incredible that such simple thing like that would be so buggy so did I miss something see picture below ? (Everything else in silverlight works

Does Silverlight 4.0 support bindings in a style setter?

我的梦境 提交于 2019-12-24 10:07:47
问题 I am trying to port an application from WPF to Silverlight but it fails on some very simple binding. I have the following simple example: <ListBox > <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="Canvas.Top" Value="{Binding X}"></Setter> </Style> </ListBox.ItemContainerStyle> <ListBox.ItemsPanel> <ItemsPanelTemplate> <Canvas></Canvas> </ItemsPanelTemplate> </ListBox.ItemsPanel> </ListBox> However, Silverlight parsing crashes. However, if I replace the binding

AG_E_NETWORK_ERROR in SIlverlight

霸气de小男生 提交于 2019-12-24 10:06:21
问题 I have few directories in my IIS server (physical location inetpub\wwwroot\SampleApp) The directories contain .jpeg images. I am iterating these images in C# from Silverlight. And this is how I assign the image on the server to my Image placeholder in SL BitmapImage bi = new BitmapImage(); bi.UriSource = new Uri(url + sharedLink + currentSlide + ".jpg"); PresentationImage.Source = bi; where PresentationImage is the container for Images. Now, when I can access some of the directories and

Call Silverlight methods from Javascript by name

这一生的挚爱 提交于 2019-12-24 09:58:18
问题 Is it possible to get a reference to a Silverlight method purely by name from Javascript, and then invoke it? With pure Javascript objects you would be something like this: var f = theObj["theMethodName"]; f.call(theObj, "an arg"); But treating a Silverlight object as an associative array doesn't seem work. I'm guessing I could probably use Eval as a last resort, but I'd rather avoid it. 回答1: The question is on how to call a Silverlight function from Javascript by name. You can easily call

WP7 Silverlight: How to make the links in a textblock clickable?

一世执手 提交于 2019-12-24 09:49:23
问题 I know this question has been asked before, but the other answers don't work for me because I'm on Windows Phone 7. I have a TextBlock whose Text is not known until runtime. I need to make all links clickable. My approach is basically the one described here, but there is no Hyperlink class in the WP7 SDK and I can't add a HyperlinkButton to textBlock.Inlines . Am I doing something wrong, or do I need a different approach? 回答1: WrapPanel with TextBlocks and HyperlinkButtons has been a pattern

Silverlight Database connecting issue

我是研究僧i 提交于 2019-12-24 09:25:15
问题 Hello guys I am working on silverlight and I have issue regarding on database connectivity. I had tried with sqlce, but this is not working. I was tried with much of blog but still is not working. so as well as MS Access also not connecting so is there any solution for the outofbroser application I am really getting stuck. beacause I am using Isolation storage but it's still not providing ID so there is no scope to use it. It's really solid problem I am suffering to using silverlight. Is

Saving image to database as varbinary (part 3)

狂风中的少年 提交于 2019-12-24 08:59:49
问题 This is yet again a problem I have with saving images in silverlight to my database, I thought I had it all working untill I tried it out with a different image... I save images to my database with following method. I first convert the image to an array of byte and then send it to my service. private void btnUpload_Click(object sender, RoutedEventArgs e) { //nieuwe instantie van de klasse "Afbeelding", om later door te sturen naar service Afbeelding a = new Afbeelding(); OpenFileDialog

Silverlight clientaccesspolicy.xml crossdomain.xml

不想你离开。 提交于 2019-12-24 08:55:59
问题 I am one of 2 developers on a silverlight project that is hosted online. The problem is that i seem to randomly have problems with our webservices not working (This never happens to my colleague). Using firebug, i had a look at any problems that it was reporting and i found this: GET clientaccesspolicy.xml 404 not found GET crossdomain.xml 404 not found Any ideas why only i have a problem with like this? We have both cleared out our cache and recycled the application pool of the webserver...

Silverlight 4: Dynamically add a HyperlinkButton to a stackpanel

落花浮王杯 提交于 2019-12-24 08:41:04
问题 I would like to retrieve a list of links from SQLServer, and programmatically create some HyperlinkButtons from that list. These buttons should be added to a StackPnael. What is the best way to do this? Something along the lines of: private void RefreshMenu() { var dc = new FrameworkCMSDomainContext(); var query = dc.GetCMSPagesForSectionQuery(Section); dc.Load(query, (s) => { foreach(var page in dc.CMSPages) { HyperlinkButton btn = new HyperlinkButton(); btn.NavigateUri = new Uri("/" +

Prism 2 SL : Remove View from Region when button clicked

情到浓时终转凉″ 提交于 2019-12-24 08:38:25
问题 I am new to Prism and I am trying to determine a best practice for deactivating a view in a Prism 2 application -- when a user clicks a button on the view I want to deactivate the view. The view is executing a command when the button is clicked. The view model is receiving the command but the viewmodel does not have a reference to the regionmanager. Should the view model know about the region manager? And even if the viewmodel had a reference to it, it needs the view instance to pass to the