silverlight-4.0

Silverlight 4 Equivalent to .NET Timer Control

心已入冬 提交于 2019-12-10 12:40:40
问题 Basically I'm wanting to insert a dynamic clock in my project. Right now I'm using the dateTime control which is fine but it's static. I need the clock to change digits with each second. In c# there is a Timer control that I would be able to use to make this dynamic clock possible. However, in Silverlight 4 I have not been able to locate any kind of Timer Control whatsoever to use in building this dynamic clock. I didn't know if I was just looking in the wrong place or if it's right under my

Determine if selected text is Hyperlink in RichTextBox?

孤者浪人 提交于 2019-12-10 12:14:57
问题 I also am hoping to populate a text box with the URL of the selected Hyperlink. I think I am along the right path with this code, but I don't know how to complete it: TextPointer position = RichTextBoxEditor.Selection.Start; Inline parent = position.Parent as Inline; foreach (Hyperlink hl in RichTextBoxEditor.Blocks.OfType<Hyperlink>()) { } 回答1: Yes... you are in the right path. Never done before but if your cursor is inside an hyperlink this gives you the hyperlink: TextPointer position1 =

Cancel a long task that's managed by a web service

人走茶凉 提交于 2019-12-10 11:58:12
问题 I have a web service with three methods: StartReport(...) , IsReportFinished(...) and GetReport(...) , each with various parameters. I also have a client application (Silverlight) which will first call StartReport to trigger the generation of the report, then it will poll the server with IsReportFinished to see if it's done and once done, it calls GetReport to get the report. Very simple... StartReport is simple. It first generates an unique ID, then it will use System.Threading.Tasks.Task

How to get the Owner of the ContextMenu (from Silverlight 4 toolkit)?

╄→гoц情女王★ 提交于 2019-12-10 11:45:27
问题 When I use ContextMenu from Silverlight 4 Toolkit I want to get ContextMenu instance's Owner, but it's not available since in ContextMenu class Owner is an internal property. For example, I have a Rectangle put inside a Border. When I right-click a Rectangle (and a context menu appears) I need to change the Rectangle Border's thickness to indicate that the Rectangle is the current element of the parent Grid, for example. So I try to use ContextMenu.Loaded event where I get the ContextMenu

How can I assign a custom UserControl to a DataGrid column header?

纵饮孤独 提交于 2019-12-10 11:27:56
问题 I am trying to make a datagrid with a custom header that has a textblock and a button. The textblock and button is represented by this UserControl I created: <UserControl x:Class="SilverlightWorkshop.Controls.CollapsibleDataGridHeader" ... /> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding HeaderText, Mode=TwoWay}" /> <Button Content="←" Click="ArrowButtonClick"/> </StackPanel> </UserControl> The idea is, when the user clicks the button, the column width will collapse to a

Caliburn.Micro: Recovering from Exception in IResult

别说谁变了你拦得住时间么 提交于 2019-12-10 11:26:53
问题 This was posted at Caliburn.Micro discussions also. I'm really looking for advice and opinions on the best way to solve. Say I have the following Action public IEnumerable<IResult> SaveStation() { yield return Busy.MakeBusy(); yield return new StationSave(_station); yield return Busy.MakeNotBusy(); yield return Show.Tab<StationBrowseViewModel>(); } StationSave is an IResult wrapper around a simple (WCF) service invocation. The service uses FaultContract/FaultException for failures. In the

Rx: Ignoring updates caused by Subscribers

会有一股神秘感。 提交于 2019-12-10 11:08:23
问题 I'm having problems figuring out how to do this. I have two instances (source & target) that implement INotifyPropertyChanged and I'm tracking the PropertyChanged event for both. What I want to do is run an action any time source.PropertyChanged is raised until target.PropertyChanged is raised. I can do that just fine like this: INotifyPropertyChanged source; INotifyPropertyChanged target; var sourcePropertyChanged = Observable .FromEvent<PropertyChangedEventArgs>(source, "PropertyChanged")

Calling Office Communicator via Silverlight Out of Browser

女生的网名这么多〃 提交于 2019-12-10 10:58:11
问题 I need to invoke office communicator to create a chat window and phone call directly from Silverlight when running out of browser. When running in browser I do this and it works pretty well: System.Windows.Browser.HtmlPage.Window.Eval(String.Format("window.open(\"sip:{0}\", target=\"_self\");", sip)); When running out of browser as far as I have gotten is to invoke the Communicator.UIAutomation via a dynamic but honestly I don't know what to do next. dynamic communicator = AutomationFactory

Silverlight 4 Getting full exceptions

柔情痞子 提交于 2019-12-10 10:36:11
问题 I have a silverlight application elevated trust deployed at my company and some errors I get the "debugging resource strings are unavailable" I was wondering if there was any way currently for silverlight 4 to get the full error message without installing the developer version of silverlight on every single machine. Thanks in advance 回答1: Hope this article helps u... Check this By default, the full exception strings are not enabled in silverlight. You need to enable it in the slr.dll.managed

Silverlight 4 - elevated permission *inside* the browser

跟風遠走 提交于 2019-12-10 10:09:52
问题 I know Silverlight 4 can handle elevated permissions outside the browser. Is there a way to accomplish this inside the browser? I need to make a folder/file upload manager that gives a better user experience than the standard , and I'd like to implement it in Silverlight. I know Java has an option to gain elevated permissions, but you have to attach a signed certificate to your app. Does Silverlight 4 have a similar option - to gain elevated permissions by attaching a signed certificate