silverlight

Detect end of ScrollView programatically in Silverlight?

Deadly 提交于 2019-12-23 02:59:06
问题 I am new to WPF and I am having some issues with this. I have a ScrollView and a RepeatButton. I want to disable the RepeatButton programatically when the ScrollView has moved all the way left or all the way right. Is there an easy way to do this in Silverlight? I found this page: http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer.scrollchanged.aspx and was thinking of adding an event listener for this, but I don't know if that is the best way to tackle the problem.

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 sequential operation for Asynchronous operation

不打扰是莪最后的温柔 提交于 2019-12-23 02:44:21
问题 I have 3 operation that need to process sequentially, they are GetMainInformation GetDetails1 GetDetails2 I'm doing this by code like below but I think it isn't clean. I want to know an alternative way to do async operation in sequential order. GetMainInformation.Completed += GetDetails1; GetDetails1.Completed += GetDetails2; 回答1: You can use Caliburn Micro's IResult and Coroutines. How to ensure all properties have loaded in Silverlight ViewModel pattern (Concurrency Control?) 回答2: You could

Silverlight asp.net WCF authentication 2.0

空扰寡人 提交于 2019-12-23 02:31:46
问题 Can anyone provide some links to good information on setting up Silverlight 2.0 to authenticate to a WCF Service through ASP.NET Forms Authentication? 回答1: I guess this link could help you http://silverlightuk.blogspot.com/2008/03/silverlight-wcf-and-aspnet.html 回答2: Here's a good place to get started. The technology that allows you to use ASP.NET Forms Auth in SL2 is called ASP.NET Application Services - it's easy to use. http://msdn.microsoft.com/en-us/library/cc838250(VS.95).aspx 回答3:

Debugging Silverlight not hitting breakpoints

别说谁变了你拦得住时间么 提交于 2019-12-23 01:24:13
问题 i am trying to develop a Silverlight application for a school project. But I’m having problems with Visual Studio not loading the break point, making it very hard to debug a Silverlight application using ViewModels. I have tried adding "Silverlight" under "Project Properties" -> "Web" -> "Silverlight", but this have done nothing. It is strange because it works some times. I have tried using Chrome, Firefox and Internet Explorer. And with Silverlight 4 and 3. Do any one know a solution for

扩展SilverLight的DataPager控件

感情迁移 提交于 2019-12-23 00:40:07
大家一定遇到这样的情况,想改变一下SL的DataPager的显示信息,比如希望分页控件上显示数据的总数。那么就需要扩展一下DataPager控件即可。   其实扩展DataPager很简单,只要获取到DataPager控件上的元素,然后再改变元素上数据。比如DataPager控件上显示“总页数”的元素是一个TextBlock,那么可以通过方法GetTemplateChild获取到,参数是元素的名称。然后通过重写方法OnApplyTemplate即可,下面请看代码 代码 /// <summary> /// 扩展DataPager类,一是要显示总数据数有多少,二是修改TextBox的宽度 /// </summary> public class ExtendDataPager : DataPager { //定义变量 TextBlock tbCurrentPagePrefix; TextBlock tbCurrentPageSuffix; Button btnNextPageButton; Button btnFirstPageButton; Button btnLastPageButton; Button btnPreviousPageButton; TextBox txtCurrentPageTextBox; int _dataCount = 0; /// <summary> ///

Need to show large amount of text on windows phone 7 screen

╄→尐↘猪︶ㄣ 提交于 2019-12-22 22:27:15
问题 I have around 800 KB of text which I want to display on the screen. Can somebody let me know possible solution to this? Because of 2048X2048 limit of textblock, I have already tried splitting the text into multiple textblocks and also tried http://blogs.msdn.com/b/priozersk/archive/2010/09/08/creating-scrollable-textblock-for-wp7.aspx. This, though works for data till 40 to 50 KB but doesn't scale to size of 800 KB. I have also tried using Listbox (as mentioned in the first soluion in the

Need to show large amount of text on windows phone 7 screen

限于喜欢 提交于 2019-12-22 22:26:07
问题 I have around 800 KB of text which I want to display on the screen. Can somebody let me know possible solution to this? Because of 2048X2048 limit of textblock, I have already tried splitting the text into multiple textblocks and also tried http://blogs.msdn.com/b/priozersk/archive/2010/09/08/creating-scrollable-textblock-for-wp7.aspx. This, though works for data till 40 to 50 KB but doesn't scale to size of 800 KB. I have also tried using Listbox (as mentioned in the first soluion in the

How can I get the parent Popup for a UIElement?

放肆的年华 提交于 2019-12-22 21:13:32
问题 I have two questions on markup below: <Popup> <Button x:Name="button"/> </Popup> Why does VisualTreeHelper.GetParent(button) return null? How can I get the parent Popup for UIElement ? 回答1: Because the Button is only added to the visual tree when the popup is being displayed. Hmm... tricky ... Edit There is an assumption in the following that your popup is defined in the XAML of UserControl so whilst its child may not be in the visual tree the popup primitive control is. Re-using some code I

How to navigate from one view to another view from viewmodel in silverlight?

旧城冷巷雨未停 提交于 2019-12-22 19:40:13
问题 I have one ViewModel and two Views. How can I navigate to View2 from ViewModel. I read somewhere that we need to use PRISM, for opening multiple Views from ViewModel in Silverlight. Is there any alternative for PRISM? 回答1: Ideally you do not want to use view logic in your viewmodel. Your viewmodel should not know anything about the view. It would be a better idea for your viewmodel to set a property letting the view know it's time to navigate. Here's an example: ViewModel : using System