silverlight-4.0

I've customized my Toolkit pie chart but now all slices are same color

北战南征 提交于 2019-12-23 02:52:25
问题 I've implemented a resource dictionary so that I could customize my tooltip on a pie chart. But now the series returns a pie chart where the slices are all the same color. How do I get it to act like it did before I applied the resource dictionary? PieDataPoint.xaml is the file I copied into my project to use as a reesource dictionary. 回答1: I was able to solve my issue. Below is my resource dictionary. I had to manually define my colors as a style near the bottom. <ResourceDictionary xmlns=

Silverlight 4: DataForm, currentItem and AutoCommit

感情迁移 提交于 2019-12-23 02:33:15
问题 I have a DataGrid and a DataForm. I'm assigning data to the DataForm with the currently selected Item in the datagrid individually as DataForm.CurrentItem . This means that I do not have any Next/Previous button on the DataForm and the user can switch to any row in the DataGrid. My problem is that although I have set the property AutoCommit="True" on the DataForm, if the user edits something and clicks on another record in the DataGrid, it crashes. How can I force it to save the DataForm when

How to fix exception MethodAccessException during file reading?

余生颓废 提交于 2019-12-23 00:46:20
问题 I have to read a text file which added in my project DataMid/Bigram_MidWord.txt where DataMid is a folder and Bigram_MidWord.txt is a file to read. When i write the statement FileStream fileStream = new FileStream(@"/SourceCode,component/DataMid/Bigram_MidWord.txt", FileMode.Open, FileAccess.ReadWrite); then i get the exception as follows: Attempt to access the method failed: System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess) How can I fix this issue? 回答1: The

How bind TabControl?

烈酒焚心 提交于 2019-12-22 21:21:49
问题 xaml <controls:TabControl x:Name="tabControlRoom" Grid.Row="1" Grid.Column="1" d:LayoutOverrides="Width, Height" ItemsSource="{Binding}" > <controls:TabControl.ItemTemplate> <DataTemplate> <controls:TabItem Header="{Binding name}"> <StackPanel Margin="10" Orientation="Horizontal"> </StackPanel> </controls:TabItem> </DataTemplate> </controls:TabControl.ItemTemplate> </controls:TabControl> and code m_roomContext.Load(m_roomContext.GetRoomQuery()); tabControlRoom.DataContext = m_roomContext

How bind TabControl?

狂风中的少年 提交于 2019-12-22 21:21:22
问题 xaml <controls:TabControl x:Name="tabControlRoom" Grid.Row="1" Grid.Column="1" d:LayoutOverrides="Width, Height" ItemsSource="{Binding}" > <controls:TabControl.ItemTemplate> <DataTemplate> <controls:TabItem Header="{Binding name}"> <StackPanel Margin="10" Orientation="Horizontal"> </StackPanel> </controls:TabItem> </DataTemplate> </controls:TabControl.ItemTemplate> </controls:TabControl> and code m_roomContext.Load(m_roomContext.GetRoomQuery()); tabControlRoom.DataContext = m_roomContext

Target Silverlight Version is stuck

…衆ロ難τιáo~ 提交于 2019-12-22 11:36:06
问题 I have my shiny new Visual Studio 2010. I want to develop a Silverlight 4 web app with it. I made a project and it told me that I needed to update my Developer version of Silverlight. I followed the link provided and did what it suggested. I then went back and created my project (under a different directory). But when I try to select the target version of Silverlight all I can see is Silverlight 3. What do I need to do to get this to show the Silverlight 4 option? 回答1: Make sure you've

Error building Visual Studio 2010 Silverlight 4 projects on Windows 7 with XP Mode

夙愿已清 提交于 2019-12-22 10:56:35
问题 I installed Visual Studio 2010 Beta 2 in an XP Mode VM on Windows 7. Then I created a trivial Silverlight 4 (beta) project and tried to build it. I get the following error: Error 1 The "ValidateXaml" task failed unexpectedly. System.IO.FileLoadException: Could not load file or assembly 'file://\tsclient\d\Users\me\Documents\Visual Studio 2010\Projects\SilverlightApplication2\SilverlightApplication2\obj\Debug\SilverlightApplication2.dll' or one of its dependencies. Operation is not supported.

Silverlight 4.0 + MVC 2.0 + WCF RIA Services + EF 4.0 = Load Error

六月ゝ 毕业季﹏ 提交于 2019-12-22 10:51:39
问题 I'm trying to buid a site with the following: VS 2010 (for the updated WCF RIA Services) Silverlight 4.0 (packaged with WCF RIA Services). MVC 2 EF 4.0 I am setting it up so that the public facing pages will be html from MVC, but the administration portion will be a silverlight navigation application using using WCF RIA Services for data access. When I create the silverlight application within a webforms application, it works (I am able to add a datagrid and retrieve data using EF 4.0 and WCF

Pass data to Child Window in Silverlight 4 using MVVM

一世执手 提交于 2019-12-22 09:59:55
问题 I have a datagrid with master detail implementation as follows: <data:DataGrid x:Name="dgData" Width="600" ItemsSource="{Binding Path=ItemCollection}" HorizontalScrollBarVisibility="Hidden" CanUserSortColumns="False" RowDetailsVisibilityChanged="dgData_RowDetailsVisibilityChanged"> <data:DataGrid.Columns> <data:DataGridTextColumn Header="Item" Width="*" Binding="{Binding Item,Mode=TwoWay}"/> <data:DataGridTextColumn Header="Company" Width="*" Binding="{Binding Company,Mode=TwoWay}"/> </data

Implementing the double-click event on Silverlight 4 Datagrid

余生长醉 提交于 2019-12-22 08:46:58
问题 Any good soul have an example of implementing the "Command Pattern" introduced by Prism on a double click event in a Silverlight 4.0 DataGrid? I tried the following: <data:DataGrid x:Name="dgUserRoles" AutoGenerateColumns="False" Margin="0" Grid.Row="0" ItemsSource="{Binding Path=SelectedUser.UserRoles}" IsReadOnly="False"> <data:DataGrid.Columns> <data:DataGridTemplateColumn Header=""> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Width="20" Height="20" Click="Button