silverlight-4.0

How to make AutomationFactory available for a silverlight application in a sharepoint site?

烈酒焚心 提交于 2019-12-13 04:18:49
问题 I am trying to create a silverloght application to open visual studio and deploy it as a webpart in sharepoint site. I am using following code: dynamic cmd = AutomationFactory.CreateObject("WScript.Shell"); cmd.Run("devenv.exe", 1, true); this is working fine in standalone silverlight application, however, when I added this as a webpart in sharepoint site. It gives an error that "This operation is not supported in the current context". Based on my search, the reason for this may be is that

HttpContext.Current in WCF service during 2nd request

余生颓废 提交于 2019-12-13 04:11:45
问题 There is a Silverlight (4.0) application that is calling to WCF-service. During 1st call to WCF-service some data are get from HttpContext.Current.Session object. During 2nd call to WCF-service HttpContext.Current is null... Do you have any idea why (and how to fix that)? Current settings: Options "aspNetCompatibilityEnabled" and "runAllManagedModulesForAllRequests" are set to true in the web.config, Service definition looks like this: [ServiceContract(Namespace = "")]

How to select fields from table in wcf ria services

自古美人都是妖i 提交于 2019-12-13 04:03:20
问题 I am using a silverlight business application using wcf ria services. in my domain class there is a method public IQueryable<Employee> GetEmployees() { return this.ObjectContext.Employees; } this method returns al the field in the table and i can bind it to datagrid. table contains employee id,employee name and age fields. Now i want to take only one or two fields from this table. i mean i need employee name and age ,not id. or i need to use employee name to bind to combobox. How can i do

Static Class Property getting NULL when Custom Validation fired in Silverlight 4 - MVVM

Deadly 提交于 2019-12-13 03:58:44
问题 1. I have created Test Class which contain Static Class and Property. namespace QSys.Data.Domain.DataSecurity { public static class TestData { public static string MyName { get; set; } } } 2. Customer Model class and Custom Validation namespace QSys.Data.Domain { [Serializable()] public class Customer { [Key] public virtual int Id { get; set; } [CustomValidation(typeof(CustomerRequiredRules), "IsCompanyNameEmpty")] public virtual string CompanyName { get; set; } public virtual string City {

ToggleButton does not fill the area(windows phone)

让人想犯罪 __ 提交于 2019-12-13 03:58:22
问题 When I create ToggleButton it does not fill all area in grid. I think it's because the pressing area is more than viewable area of the button. How can I make these areas equal? <Grid Grid.Column="0"> <ToggleButton x:Name="ToggleHorizontal" IsChecked="False"/> </Grid> 回答1: By default toggle button (not only but it too) has touch area around visible border with thickness of 12 px (PhoneTouchTargetOverhang constant, see MSDN). You can see this by editing the style of toggle button in the Blend.

Interactive WPF relational datagrid system samples?

假如想象 提交于 2019-12-13 03:58:21
问题 I am wondering if someone can share or point to good samples of datagrid structure that can be used in Silverlight application. I need to have 4 relational datagrids where one of them is master datagrid which has most of the data. I should be able to delete or add or change properties of the items. This changes should also affect other datagrids. For example, if I delete one item from master datagrid then the instance of that item should be deleted from other datagrids. Any information is

How to make a cell in a datagrid readonly based the content on another cell in SL4?

感情迁移 提交于 2019-12-13 03:37:59
问题 I have two columns, the second column depends on the content on the first column. By default, the second columns is readonly. When I enter some valid value, I want the second column to become editable. To achive this, I created a cell template and cell edit template on the second column where back ground and read only bound to the first column. On load, the first column is null so my second columns comes correctly as read only. Following is Cell Template for second column, where the

SL4: need to register for a move (or redraw) event on an Item in an ItemsControl

老子叫甜甜 提交于 2019-12-13 03:35:46
问题 Not finding a move event or redraw event in the FrameworkElement class. And Google not helping either. So... I have a custom ItemsControl populated by an observable collection in the VM. The ItemsControl itself leverages the <i:Interaction.Behaviors> <ei:MouseDragElementBehavior ConstrainToParentBounds="True"/> </i:Interaction.Behaviors> behavior so the user can drag around the whole assembly. When the user moves the assembly, I want to be notified by each item as the item is repositioned as

Silverlight 4 - Binding ComboBox in DataGrid to property of WCF Client Contract class

主宰稳场 提交于 2019-12-13 03:34:41
问题 I have a scenario that does not seem to be covered in any of the other similar questions (most of which are unanswered anyways). Here goes: I have the following items to work with: 1) A WCF Service that returns a very complex data contract with over 100 properties. I do not wish to create a ViewModel of this object as I don't want to have to maintain over 100 properties unless absolutely necessary . 2) I have a Silverlight UserControl that has this data contract defined as a Resource:

DataContext and Command in silverlight when used together is not working

穿精又带淫゛_ 提交于 2019-12-13 03:34:27
问题 I am using Silverlight 4.0 to implement MVVM architecture, I have got a usercontrol TestMVVM.View.EmployeeView and a view EmployeeList within this usercontrol. EmployeeList contains some textbox and a button. My problem is when I use DataContext on the EmployeeList as given in the code the command on button stops working but if I remove DataContext from EmployeeList the command of button works fine. <UserControl x:Class="TestMVVM.View.EmployeeView" xmlns="http://schemas.microsoft.com/winfx