silverlight-4.0

Get Row from Index in Silverlight DataGrid

℡╲_俬逩灬. 提交于 2019-12-10 10:06:24
问题 I am trying to implement reordering rows in a Silverlight DataGrid. For this I am extending the default DataGridDragDropTarget , and I need to override and implement the following method: protected override DataGridRow ContainerFromIndex(DataGrid itemsControl, int index) { } How can I get the DataGridRow from the DataGrid and the Index? 回答1: A slight improvement on Herzmeister's answer, see comments: protected override DataGridRow ContainerFromIndex(DataGrid itemsControl, int index) { var

How to change background colors in ReadOnly textbox in silverlight 5?

╄→尐↘猪︶ㄣ 提交于 2019-12-10 09:51:48
问题 I Want To Change Color of ReadOnly Textbox It is Possible To Change Default Color to white Color <Style TargetType="TextBox"> <Setter Property="Background" Value="White"/> <Setter Property="Foreground" Value="Black"/> </Style> and textbox as <TextBox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Height="18" Padding="0" IsReadOnly="True" Margin="3,0,3,0"/> Thanks In Advance 回答1: The problem is not that the Background Setter doesn't work, it is that the ReadOnly state for the

Multiple Out-of-Browser Applications in One Application

六眼飞鱼酱① 提交于 2019-12-10 09:33:33
问题 I'm looking at a scenario where I need to create a single "master" Silverlight application and then add "child" applications for an out-of-browser Silverlight application. The scenario is something like this. A user will visit a gameboard web site and choose a game to play. Let's call it Checkers. He likes it, so then he installs the out-of-browser app to his desktop. He then finds Chess, and installs that too. For both games, while played on the site, he has stats (games played, win/loss

Why can I not bind the Visiblity of a DataGridTemplateColumn in Silverlight 4?

隐身守侯 提交于 2019-12-10 01:33:48
问题 It seems that it is not possible to bind the visibility property of a DataGridTemplateColumn in Silverlight 4 still. I did some Googling and there seem to be a few posts suggesting it was to do with the fact that it was not a DependencyObject and how this would change in SL4 but it does not seem to be the case. To work around it, I do it in the code behind of the datagrid loaded event, but I am curious as to why this is the case? Here is the error message I get (with a converter that returns

How do I debug my Silverlight 4 application?

◇◆丶佛笑我妖孽 提交于 2019-12-09 20:28:06
问题 I cannot figure out how to get my breakpoints to take in my silverlight application. I've tried setting up a test page, but nothing seems to work. Here are some of the things I've tried: Enable Silverlight Debugging : In my Web project, I've set the 'Web' => 'Debuggers' => 'Silverlight' to checked. Attach to Process : I'm using Chrome, but the page I need to attach my debugger to is disabled in my 'Attach to Process' window. Using Firefox : I followed Tim Heuer's post where he describes

Code error 2104 after moving aspx page to some folder

怎甘沉沦 提交于 2019-12-09 20:00:31
问题 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).

Isolated storage location for windows phone 7?

谁说胖子不能爱 提交于 2019-12-09 18:25:44
问题 I'm building a windows phone 7 application using silverlight 4. I store my data in Isolated storage as outlined here. The program runs with no errors. My question is where I can see the file I have saved? Is it possible to find the file in the windows phone 7 emulator? 回答1: The "Mango" SDK ships with the ISETool that can take and restore snapshots of an application's isolated storage to/from a local directory: # Copy data from IS to directory ISETool.exe ts xd <PRODUCT-ID> "C:\TempDirectory

“CreateRiaClientFilesTask” task failed unexpectedly

时间秒杀一切 提交于 2019-12-09 15:54:12
问题 This error has started occuring when attempting to build my VS 2010 Silverlight project after some minor changes to my RIA domain services, which are hosted within the Silverlight website application. There appears to be no reason for this error and I cannot understand the access denied part of the error. Things I have tried: 1) Full clean of all projects in the solution and re-build 2) Deletion of all temporary ASP.Net files from the framework folder 3) Removal of linked RIA services from

INotifyPropertyChanged in UserControl

女生的网名这么多〃 提交于 2019-12-09 15:00:11
问题 I have a custom control which is inherited from TextBox control. I would like to implement the INotifyPropertyChanged interface in my custom control. public class CustomTextBox : TextBox, INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; protected void NotifyPropertyChanged(string info) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(info)); } } My problem is when I try to raised a PropertyChanged event the PropertyChanged

DataTemplate vs ItemContainerStyle

谁说我不能喝 提交于 2019-12-09 10:53:25
问题 I've seen a few other Silverlight 'vs' questions around, but couldn't find any for this particular match-up. I'm trying to define the way in which my objects bound to a ListBox will display. I've defined a DataTemplate , but I'm really not sure where this should end and the ItemContainerStyle should begin. Question 1: Is the ItemContainerStyle just a wrapper for the DataTemplate so that a common item style can be applied to different data layouts? Question 1a: If so, in the event that a