silverlight-4.0

POCO entity-based RIA service can't de-serialize associated entities

╄→гoц情女王★ 提交于 2019-12-12 01:35:32
问题 I'm developing a Silverlight Business Application, using a RIA service, which is returning POCO entities (TaskTime and User). The TaskTime entity has a User entity associated with it. I have created a domain service which has a query function (GetTimesheet) which returns an IQueryable collection of TaskTime entities, which works fine if I don't try and get the associated User entities as well, but as soon as I include the [Include] and [Association] attributes above the 'User' property in the

Unable to refresh/update data grid after insert in Silverlight 4

て烟熏妆下的殇ゞ 提交于 2019-12-12 01:35:30
问题 I am creating a master detials silverlight page and am having trouble updating the datagrid after inserting a new record. On the top of the page I have text boxes to enter information, when a user clicks on save I would like the information automatically updated in the database and displayed on the datagrid without refreshing the screen. I am able to save the information to the db with no problems its just trying to get the datagrid to refresh with the new changes. Some of my code behind for

Custom RichTextBox Control

旧城冷巷雨未停 提交于 2019-12-12 00:48:42
问题 In my Windows Phone application I use a RichTextBox Control. I have very long text, so the standard control displays only a part of it. On the internet I have found this solution: Creating-scrollable-Textblock-for-WP7 - that can help me. It separate blocks and creates a TextBlock for each of the text blocks. But how can I do this for a RichTextBox? Is it possible, because the RichTextBox in my case contains a lot of blocks? 回答1: You can resolve this by adding multiple RichTextBox control

Datagrid column IsReadOnly property not working in Silverlight 4?

时光怂恿深爱的人放手 提交于 2019-12-11 23:48:11
问题 I'm currently working on a DataGrid which in some conditions should disable or enable particular columns by changing IsReadOnly to true and vice versa. I attached to CurrentCellChanged and CellEditEnded events in which I change the column IsReadOnly property. I expect the application to disable / enable edit on that column. Even though the column has IsReadOnly set to true sometimes it does allow edits. I've also tried to call CancelEdit(); on a grid but that didn't make any effect either. If

Style in HeaderColumn in Datagrid

南笙酒味 提交于 2019-12-11 23:19:32
问题 Please see this following image of my datagird. Now want a border in headerColumn. I have tried columnheader style but it did not work for me. I want following style of header of datagrid.Please see the following image. How can i achieve this style in datagird. Thanks 回答1: You have to change the DataGrid template, not columnheader. In the default DataGrid template there is: <sdk:DataGridColumnHeadersPresenter x:Name="ColumnHeadersPresenter" Grid.Column="1"/> I think you have to edit over

Silverlight 4 Combobox with selectedValue using MVVM-Light

北城余情 提交于 2019-12-11 23:09:49
问题 I have recently started using the MVVM-Light toolkit and I am stuck on the following problem: I have a basic Silverlight Combobox that is bound to a viewmodel with an ObservableCollection of type MyUser. The Combobox implements a custom DataTemplate to combine the user’s name and surname. After loading the list of users, how do I set the Combobox to select the first user in the list and display this selected user in the collapsed Combobox? I know that it has been suggested to use the

putting Button inside a TextBlock(or maybe something else) to make it work like the one on video?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 22:13:58
问题 with Silverlight 4, I am trying to create the TextBlock just like the one on the Microsoft LightSwitch(Modal Window Picker) . So I can use it as a customControl inside the GridView columns. this is the link from youtube: you can see the one i am talking starting at time 08:54 / 14.50 on the Business label http://www.youtube.com/watch?v=GVApqFMqRbU Basically, when the mouse moves over to the Business textblock then the button will appear inside it on the right side.When the mouse moves outside

stop the stackpanel items inside scroll viewer to be at the display left side when scroll

天涯浪子 提交于 2019-12-11 18:09:25
问题 I have added 10 images in a stackpanel horizontally which is inside a scrollviewer. When user swipe the page ,the scrollviewer stops at certain position, if the scroll stops in the middle of 2 images like the first image shown below i want to set the image with number 3 to be automatically scroll and fit with the left side of the screen like in the second image for (int i = 0; i <= 9; i++) { Uri uri = new Uri("http://d1mu9ule1cy7bp.cloudfront.net//catalogues/47/pages/p_" + i + "/thump.jpg");

Visibility of User Control

孤街浪徒 提交于 2019-12-11 17:45:18
问题 In my application got one sidebar, which is holding this two component : <Grid x:Name="AF" Visibility="Visibility"> <betata:AForm Height="508" VerticalAlignment="Top"/> </Grid> <Grid x:Name="AN" Visibility="Collapsed"> <betata:ANav Height="508" VerticalAlignment="Top"/> </Grid> in the AForm got hyperlink button with this method : private void HyperlinkButton_Click(object sender, RoutedEventArgs e) { Visibility = Visibility.Collapsed; Sidebar sb = new Sidebar(); sb.AN.Visibility = Visibility

Hosting a Silverlight application in a View?

六眼飞鱼酱① 提交于 2019-12-11 16:55:19
问题 I need to write a little wizard application into which a user inputs some information. I was going to write this as a silverlight application. The website hosting it is developed using ASP.NET MVC 2 (.NET 4.0). Is it possible to host a silverlight application in an ASP.NET MVC 2 View? Also, are there any good frameworks out there for creating online wizard applications like the one I need to create? TIA 回答1: Is it possible to host a silverlight application in an ASP.NET MVC 2 View? Yes,