Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the function of Silverlight?

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article is to share with you about the role of Silverlight. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

First, the method of DebugSilverlight application program:

* species:

1.Silverlight reference Namespace: System.Diagnostics

two。 Write Debug.WriteLine where necessary in the program ("what you want to output")

When 3.Debug, you can output "what you want to output" in the output window.

The second kind:

1. Reference Namespace: System.Windows.Browser

two。 Write HtmlPage.Window.Alert ("alert information") where necessary for the program.

3. At run time, you can alert "alert information".

Personally, I think both of these methods are very good, especially *, which is much more convenient than setting a breakpoint to debug somewhere. As long as you see that there is no output, you know where something went wrong.

Second, Silverlight uses full screen

1. Reference Namespace: System.Windows.Interop

two。 Write where necessary in the program: ContentmyContent=newContent (); myContent.IsFullScreenwriting myContent.IsFullScreen

In this way, you can control whether the running program is full screen.

Third, implement Timer timer

1. Reference Namespace: System.Windows.Threading

two。 Instantiate the Timer object:

DispatcherTimertimer=newDispatcherTimer (); timer.Interval=TimeSpan.FromMilliseconds (10); timer.Tick+=newEventHandler (timer_Tick); voidtimer_Tick (objectsender,EventArgse) {/ / todo}

In this way, a timer has been completed.

But for it to execute, you must write timer.Start (); to stop, write timer.Stop ()

Thank you for reading! This is the end of this article on "what is the role of Silverlight?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report