silverlight-3.0

Tools for automating SilverLight application

我只是一个虾纸丫 提交于 2019-12-02 02:15:01
I want to automate the application develoepd in silverlight. Can you let me know whether there are any open source tools are available which can be used for automating SilverLight app. Thanks. We are doing UI testing on a Silverlight application using the UIAutomation API , and it works very nicely. Project White is a library that sits on top of UIAutomation, and many people find it helpful. I prefer to use the UIAutomation APIs directly - it's really not as hard as you might think, as my tutorial shows. Jeff Wilcox If you're looking to perform User Interface Automation (UIA) to simulate mouse

Silverlight ComboBox and SelectedItem

≡放荡痞女 提交于 2019-12-01 19:17:47
I have the following scenario: 1 List which contains the months of the year: public List<String> Months { get { return m_Months; } } m_Months = new List<String>(); for (int i = 1; i <= 12; i++) { DateTime date = new DateTime(1900, i, 1); m_Months.Add(date.ToString("MMM")); } 1 ComboBox whose ItemsSource is bound to the Months-list and whose SelectedIndex is bound to the property Month, which is a string: public string Month { get { return m_Month; } set { if (value != m_Month) { m_Month = value; NotifyPropertyChanged("Month"); } } } <ComboBox SelectedItem="{Binding Month, Mode=TwoWay}"

Getting Runtime Assemblies in Silverlight 3

纵然是瞬间 提交于 2019-12-01 18:53:55
I am currently writing a framework dll which has an AssemblyHelper. This helper stores Runtime and UserAdded assemblies to easily instantiate new objects. The .NET part of the framework uses: AppDomain MyDomain = AppDomain.CurrentDomain; Assembly[] AssembliesLoaded = MyDomain.GetAssemblies(); _runtimeAssemblies = AssembliesLoaded; This gets me all the assemblies I need. But the problem is I can't use this with Silverlight and I have no idea what to use now. Currently I am using: Assembly[] AssembliesLoaded = {Assembly.GetCallingAssembly()}; But this only adds the Assembly of my framework and

Is there no Label control in Silverlight?

和自甴很熟 提交于 2019-12-01 17:29:57
I can't seem to find a Label control in Silverlight. I get compile errors if I put anywhere in my XAML. TextBlock is roughly the same as a Label from WinForms. As per MSDN : The TextBlock control is the primary element for displaying text in Silverlight based applications. Provides a lightweight control for displaying small amounts of text... EDIT : I just noticed your tag for Silverlight 3. Label should be built into Silverlight 3 so are you sure your not using 2? You might want to consider a TextBlock depending on how your using it. Again per MSDN : A Label control displays a caption,

Silverlight ComboBox and SelectedItem

青春壹個敷衍的年華 提交于 2019-12-01 17:24:22
问题 I have the following scenario: 1 List which contains the months of the year: public List<String> Months { get { return m_Months; } } m_Months = new List<String>(); for (int i = 1; i <= 12; i++) { DateTime date = new DateTime(1900, i, 1); m_Months.Add(date.ToString("MMM")); } 1 ComboBox whose ItemsSource is bound to the Months-list and whose SelectedIndex is bound to the property Month, which is a string: public string Month { get { return m_Month; } set { if (value != m_Month) { m_Month =

Possible to programmatically add User Control to Silverlight Grid Column?

不打扰是莪最后的温柔 提交于 2019-12-01 15:58:59
I have a User Control that I need to programmatically add to a Silverlight Grid t a specified Row and Column index. The requirements are such that I will need to insert at arbitrary indices, such that pure databinding is perhaps not ideal. I would prefer not to have to create the grid from scratch in the code behind. Can this be done? Anyone with example? Use Grid.Children.Add to add it to the grid, and Grid.SetRow and Grid.SetColumn to set the row and column index. E.g. Grid.SetRow(myControl, 3); Grid.SetColumn(myControl, 4); myGrid.Children.Add(myControl); 来源: https://stackoverflow.com

Possible to programmatically add User Control to Silverlight Grid Column?

心已入冬 提交于 2019-12-01 14:55:43
问题 I have a User Control that I need to programmatically add to a Silverlight Grid t a specified Row and Column index. The requirements are such that I will need to insert at arbitrary indices, such that pure databinding is perhaps not ideal. I would prefer not to have to create the grid from scratch in the code behind. Can this be done? Anyone with example? 回答1: Use Grid.Children.Add to add it to the grid, and Grid.SetRow and Grid.SetColumn to set the row and column index. E.g. Grid.SetRow

How do I Immediately Validate a Newly Inserted Row in a Silverlight 3 Datagrid?

為{幸葍}努か 提交于 2019-12-01 09:21:00
I have a Silverlight 3 tools library with a custom DataGrid user control. This grid has no direct access to the WCF RIA Services entity types so I'm using reflection to add a new item when the user clicks on the grid when it's empty: private void InsertEmptyRecord() { if (this._dataGrid.ItemsSource == null) return; Type[] typeParameters = this._dataGrid.ItemsSource.GetType().GetGenericArguments(); if (typeParameters.Count() > 0) { Type itemType = typeParameters[0]; object newItem = System.Activator.CreateInstance(itemType); Type sourceType = typeof(System.Windows.Ria.EntityCollection<>); Type

How do I Immediately Validate a Newly Inserted Row in a Silverlight 3 Datagrid?

家住魔仙堡 提交于 2019-12-01 06:04:44
问题 I have a Silverlight 3 tools library with a custom DataGrid user control. This grid has no direct access to the WCF RIA Services entity types so I'm using reflection to add a new item when the user clicks on the grid when it's empty: private void InsertEmptyRecord() { if (this._dataGrid.ItemsSource == null) return; Type[] typeParameters = this._dataGrid.ItemsSource.GetType().GetGenericArguments(); if (typeParameters.Count() > 0) { Type itemType = typeParameters[0]; object newItem = System

Silverlight and ArrayList

微笑、不失礼 提交于 2019-12-01 04:18:53
Does Visual Studio 2010's Silverlight support ArrayList? If yes then how to use it, if not then why? How to use ArrayList in Silverlight? Singleton Silverlight don't support ArrayList now, see http://www.infoq.com/news/2007/07/ArrayList-Gone . EDIT: Here is the content from this link, an effort to reduce the size of the Silverlight runtime, most of the non-generic collection types will be removed. These include types once considered essential to .NET programming including ArrayList, Hashtable, and Comparer. According to Inbar Gazit of Microsoft's Base Class Library team, the non-generic