silverlight-4.0

Diagramming in Silverlight MVVM- connecting shapes

岁酱吖の 提交于 2019-12-04 22:37:02
have I have a quesition regarding MVVM pattern in the use case diagarm. What I have so far is a list of Items which are my Shapes. ObservableCollection<ItemsViewModels> Items; and a Collection of Connection of Items ObservableCollection<ConnectionViewModel> Each ItemViewModel has an ID and a ConnectionViewModel has two ID to connect the Items. My ItemsViewModel Collection is bound to a Itemscontrol which is layout on a Canvas. With the ElementMouseDragBehavior I am able to drag my Items around. Now comes my big question =) How can I visualize my connections that I will be able to move the

how to declare dataset in silverlight for windows phone7 using c#?

爷,独闯天下 提交于 2019-12-04 22:13:06
Please post the answer for how to declare dataset in silverlight for windows phone7 using c#? There is no support for datasets in WP7. You have to build your own datacollections. (For example you could use the ObservableCollection). My suggestion would be to check the code samples on the MSDN page. (The WeatherForecast example uses webservices to retrieve data). Also I would suggest to read some on the MVVM pattern. ( MSDN Article ) Instead of Dataset you should use ObservableCollection to store your data (which you have read from your WCF or RESTful webservice) and bind it to your ListBox. To

Getting the values of TextBox from a data bound ListBox

这一生的挚爱 提交于 2019-12-04 20:57:19
I need to get the values from Listbox selected items. Note that, the data templates are in data bound. here is the xaml: <ListBox Name="AppointmentResultsData" ItemsSource="{Binding}" Height="650" Width="480" Margin="24,0,0,0" Foreground="#CBF7FA" SelectionChanged="AppointmentResultsData_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <TextBlock Text="{Binding Path=Subject, Mode=TwoWay}" TextWrapping="Wrap"

Why .gif image shows only some first frames(Windows Phone)

こ雲淡風輕ζ 提交于 2019-12-04 18:18:27
my previous question with source code is here: How to use gif animated image in WP 7 I am using http://imagetools.codeplex.com/ in my animated gif I have 24 frames, but it decodes only some first frames, so I see repetition animation of some(maybe two) frames again and again For some gif-files this decoder work, for some other - don't. I downloaded source code of that project and found the code which doesn't work correctly. It is situated in the ImageTools.IO.Gif\GifDecoder.cs file, the Decode method: int nextFlag = stream.ReadByte(); while (nextFlag != 0) { //... } But this gif contains the 0

Silverlight Timer-Like Functionality

随声附和 提交于 2019-12-04 17:51:36
So what I have is a textbox that submits data back to the server. I want to have it submit once the person has stopped typing. My thought process was to have a timer and have the textbox change set the timer to start (if stopped) and reset the countdown time to lets say 3 seconds if its already running and have the timer.Tick event submit the changes... Is there a better method for doing that? Is there one that works? You can use a DispatcherTimer to do this. Just start the timer when the textbox gets focus and whenever the keydown event happens mark a variable that notes the user is typing.

How do I display a document (rtf/doc/pdf/xps) in Silverlight? I need documentation in my app

五迷三道 提交于 2019-12-04 16:46:45
This is a hard question to search for as "help" and "documentation" generates a lot of false hits. I basically want to show some simple documentation or help in my Silverlight app. And I don't want to write this in XAML, obviously, so I would love to be able to add a WordPad (or similar, free and easy) document to my app that would get display with some basic formatting in Silverlight. Any ideas? Try embedding an iframe using an iframe overlay, then you can load any HTML-like content. There is an excellent explanation of how to do this here: http://www.wintellect.com/cs/blogs/jlikness/archive

How to open window pop-up from Silverlight Out-of-Browser?

非 Y 不嫁゛ 提交于 2019-12-04 16:19:45
I need to open window pop-up from Silverlight Out-of-Browser application. I've added parameter <param name="enablehtmlaccess" value="true" /> in Index.html, but executing this from code behind: HtmlPage.Window.Navigate(new Uri(myUrl), "_blank", myFeatures); still returns error: Silverlight OOB Error: The DOM/scripting bridge is disabled. I've read about this post, does it mean that I can't open pop-up from OOB? Why I need to do this, because actually I've shown the HTML page in OOB Silverlight by WebBrowser control within ChildWindow but when I click an anchor in HTML page, which linked to

Code error 2104 after moving aspx page to some folder

旧城冷巷雨未停 提交于 2019-12-04 15:50:07
I get the following error after moving aspx page to some folder. Error: Unhandled Error in Silverlight Application Code: 2104 Category: InitializeError Message: Could not download the Silverlight application. Check web server settings Environment: Win7 x64, VS2010, SL 4.0.50524.0, IE8, IIS7.5 Steps to reproduce: In VS 2010 create a new Silverlight Application (target .NET Framework 4.0). Host the Silverlight application (Silverlight version 4.0) in a new Web site (Web application project). Runs SilverlightApplication.web project, where the starting page is SilverlightApplicationTestPage.aspx

Dynamically Creating Controls Following MVVM pattern

那年仲夏 提交于 2019-12-04 14:39:49
I'd like to dynamically generate some controls in my silverlight application. To be more clear, here's a simplified definition of my class: public class TestClass { [Display(Name="First Name")] public string FirstName { get; set; } [Display(Name = "Last Name")] public string LastName { get; set; } public List<CustomProperty> CustomProperties { get; set; } } Each "CustomProperty" will finally be a TextBox, CheckBox or ComboBox: public class CustomProperty { public CustomDataType DataType { get; set; } //enum:integer, string, datetime, etc public object Value { get; set; } public string

Silverlight 4 Assembly Sharing Problem

跟風遠走 提交于 2019-12-04 12:56:46
I have a WPF .NET 4.0 class library referencing a Silverlight 4 class library. The SL library compiles fine but when I compile the WPF class library, I get: Error 2 Unknown build error, 'Cannot resolve dependency to assembly 'System.Windows, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.' MyProj.Presentation.Wpf I figure the problem must be similar to the one mentioned here: http://markti.spaces