silverlight-3.0

Is there a way to serialize multiple XElements onto the same line?

放肆的年华 提交于 2019-12-23 07:04:30
问题 I'm dealing with the dreaded <Run/> in Silverlight 3 and having to programmatically create a <TextBlock> and its inlines: Why dreaded? Because it doesn't work, I guess, the way you'd expect. Exhibit A, below, should produce BARN (with fancy colors for each character), but instead it produces: B A R N EXHIBIT A <TextBlock FontFamily="Comic Sans MS" FontSize="88"> <Run Foreground="#A200FF">B</Run> <Run Foreground="#FF0000">A</Run> <Run Foreground="#FFC000">R</Run> <Run Foreground="#FFFF00">N<

Is there a way to serialize multiple XElements onto the same line?

徘徊边缘 提交于 2019-12-23 07:04:29
问题 I'm dealing with the dreaded <Run/> in Silverlight 3 and having to programmatically create a <TextBlock> and its inlines: Why dreaded? Because it doesn't work, I guess, the way you'd expect. Exhibit A, below, should produce BARN (with fancy colors for each character), but instead it produces: B A R N EXHIBIT A <TextBlock FontFamily="Comic Sans MS" FontSize="88"> <Run Foreground="#A200FF">B</Run> <Run Foreground="#FF0000">A</Run> <Run Foreground="#FFC000">R</Run> <Run Foreground="#FFFF00">N<

How to get all methods from WCF service?

岁酱吖の 提交于 2019-12-23 04:36:34
问题 How to get list of all methods from WCF silverlight enabled service from code. I already have added service reference to Silverlight application. Can I get all methods using Reflection? If can please provide me example. 回答1: Given the type of the service class you could use the GetMethods function to get a list of all the methods through reflection: MethodInfo[] methods = typeof(TypeOfTheService).GetMethods(); foreach (var method in methods) { string methodName = method.Name; } 来源: https:/

Dependency Properties and Data Context in Silverlight 3

那年仲夏 提交于 2019-12-23 04:23:19
问题 I am working with Silverlight 3 beta, and am having an issue. I have a page that has a user control that I worte on it. The user control has a dependency property on it. If the user control does not define a data context (hence using the parent's data context), all works well. But if the user control has its own data context, the dependency property's OnPropertyChanged method never gets called. Here is a sample: My Main Page: <UserControl x:Class="TestDepProp.MainPage" xmlns="http://schemas

Silverlight Event Log in Isolated Storage

≡放荡痞女 提交于 2019-12-23 03:22:07
问题 Has anyone written an event log that uses Isolated Storage in Silverlight 3? Any suggestions on implementing one? Specific questions: Should I keep a stream writer open, or should I open,write, and close for each entry? How should I remove items from the log atomically? 回答1: I heard clog from codeplex is pretty good although it targets wcf, i read on codeproject about about a log4net approach that works for silverlight, although both of these log 2 wcf services, im sure with a bit of tweaking

Silverlight Event Log in Isolated Storage

偶尔善良 提交于 2019-12-23 03:22:02
问题 Has anyone written an event log that uses Isolated Storage in Silverlight 3? Any suggestions on implementing one? Specific questions: Should I keep a stream writer open, or should I open,write, and close for each entry? How should I remove items from the log atomically? 回答1: I heard clog from codeplex is pretty good although it targets wcf, i read on codeproject about about a log4net approach that works for silverlight, although both of these log 2 wcf services, im sure with a bit of tweaking

Case sensitive UriMapper issue in Silverlight 3

…衆ロ難τιáo~ 提交于 2019-12-22 14:41:43
问题 In Navigation API of Silverlight 3 the UriMapper class is case sensitive. For the following uri mapping <nav:Frame Source="/Home"> <nav:Frame.UriMapper> <uriMapper:UriMapper> <uriMapper:UriMapping Uri="" MappedUri="/Views/HomePage.xaml"/> <uriMapper:UriMapping Uri="/entity/{code}" MappedUri="/Views/EntityEditorPage.xaml?code={code}"/> <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}Page.xaml"/> </uriMapper:UriMapper> </nav:Frame.UriMapper> </nav:Frame> the "/entity/123" is

Case sensitive UriMapper issue in Silverlight 3

可紊 提交于 2019-12-22 14:41:01
问题 In Navigation API of Silverlight 3 the UriMapper class is case sensitive. For the following uri mapping <nav:Frame Source="/Home"> <nav:Frame.UriMapper> <uriMapper:UriMapper> <uriMapper:UriMapping Uri="" MappedUri="/Views/HomePage.xaml"/> <uriMapper:UriMapping Uri="/entity/{code}" MappedUri="/Views/EntityEditorPage.xaml?code={code}"/> <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}Page.xaml"/> </uriMapper:UriMapper> </nav:Frame.UriMapper> </nav:Frame> the "/entity/123" is

Silverlight, RIA Services, MVC2P2 = No Data

南笙酒味 提交于 2019-12-22 13:13:13
问题 I am having trouble upgrading my current project to use RIA Services. I added all the necessary web.config changes but still no luck. I everything compiles fine but when I hit the page using the datacontext I get an error. I debugged with fiddler and I'm getting a 404 on one of the request. I am getting back headers in my grid so some communication is happening but no data is actually coming through. Another thing to note is that my MVC is running windows authentication. I do have a

How to debug serialization error in tombstoned WP7 app

﹥>﹥吖頭↗ 提交于 2019-12-22 10:49:08
问题 I am handling the current state of my WP7 app in the OnNavigatedFrom and To events so that if the app is tombstoned OR they navigate to a different page it saves the state to the inbuilt PhoneApplicationService state. I have a simple ViewModel which I dump to the state to make life easier. When navigate to a different page within my app, the state is stored fine and restores fine (ie. I assume it is serializing at this point). However, when I tombstone the app (i.e. Start button) I am getting