article search result of 'Application.Run' : 1

  1. 2011.02.01 [XNA , WPF] XNA 에서 코드레벨로 WPF 생성하기 (165)

[XNA , WPF] XNA 에서 코드레벨로 WPF 생성하기




필요한 레퍼런스는
 
System.Windows.Presentaion
System.Xaml
PresentationCore
PresentationFramework

이고  필요한 using 은

using System.Threading;
using System.Windows;
using System.Windows.Controls;

되겠다.


Created with colorer-take5 library. Type 'csharp'
XNA , Game1.cs 중 일부

        Texture2D tex;
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            tex = Content.Load<Texture2D>("logo2");
            this.Window.Title = "currentThread :" + Thread.CurrentThread.ManagedThreadId;
            
            //[0] 새로운 wpf 어플을 생성하기 위해 새로운 스레드 생성 , 스레트타입은 STA
            Thread t = new Thread(startThread);
            t.ApartmentState = ApartmentState.STA;
            t.Start();
        }
        void startThread()
        {
            //[1] Application 객체를 선언하고 생성
            Application app = new Application();
            //[2] StartUp 이벤트를 건다.
            app.Startup += new StartupEventHandler(app_Startup);
            //[3] 그리고 시작!
            app.Run();
        }

        void app_Startup(object sender, StartupEventArgs e)
        {
            //[4] 새로운 윈도우를 생성한다
            Window win = new Window();
            win.Width = 300;
            win.Height = 300;
            win.Title = "currentThread :" + Thread.CurrentThread.ManagedThreadId;
            //[5] 새로운 윈도우를 표시한다
            win.Show();

            Button bt = new Button();
            bt.Content = "XNA 에서 WPF 생성��기";
            win.Content = bt;
        }

역시나 윈도우폼과 마찮가지로 STA 타입의 스레드가 필요하다.
그러나 윈폼과 Application 의 사용법이 다른점에 주의! (그냥 Application.Run 하면 안된다.)

또한 닷넷4.0의 경우 System.Xaml 을 필히 참조 시켜줘야 겠다. 
Yamecoder 야매코더_
XNA 2011. 2. 1. 16:03

댓글을 달아 주세요

  1. 이전 댓글 더보기
  2. BlogIcon cheap mont blanc pens 2015.01.09 03:41  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  3. BlogIcon furla purses outlet 2015.01.09 06:45  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  4. 匿名 2015.01.14 18:27  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  5. 匿名 2015.01.14 18:29  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  6. 匿名 2015.01.15 12:22  수정/삭제  댓글쓰기

    이용약관위배로 관리자 삭제된 댓글입니다.

  7. BlogIcon mont blanc pen 2015.01.31 14:00  수정/삭제  댓글쓰기

    일에Saints big underdogs in Cup final vs

    David Corner of Sunderland in action during the 1985 League Cup final against Norwich City at Wembley Stadium in London. Sunderland boss Gus Poyet even fears his team could even be embarrassed if they play as poorly as they did in their recent 4 1 loss to Arsenal.

    Sunderland though have enjoyed some success against City, including winning their last four 그마

  8. BlogIcon louis vuitton outlet 2015.02.06 02:38  수정/삭제  댓글쓰기

    법에The most effective 10 The majority of well-known New york Artists

    Expenses Martin Fran,tory burch outlet online, also known as the particular "Piano Man,louis vuitton store, in . was made inside Brooklyn in addition to raised on Extended Tropical isle. Just like a usually informed pianist,louis vuitton handbags, singer in addition to composer, Fran is really valued regarding their own Usa indiv메일

  9. 匿名 2015.02.11 14:03  수정/삭제  댓글쓰기

    마메骑士服务端天上碑服务端美丽世界服务端科洛斯服务端石器时代服务端

    完美世界服务端烈焰服务端洛汗服务端新魔界服务端绝对女神私服务端

    征服服务端传说45服务端天之炼狱服务端天堂II私服务端墨香私服务端


    传奇开sf一条龙开区服务-

    天龙八部开私服一条龙服务-


    传奇广告代理-

    IDC服务器以及空间租用-

    魔域私服开区一条龙服务-


    客服咨询QQ(企鹅扣扣)49333685

    Email:49333685@qq.com

    后浪科技更多商业版本免费开放下载




    后浪科技科技仿官神武血魔版服务端



    后浪科技石器时代VIP最新V10纯金开区端



    后浪科技热血江湖3.5宠门武勋开区端



    后浪科技剑侠情缘X2.0商业版本服务端



    后浪科技v2.07已开5区七转神台天降横财八卦玄阵血魄技려지

  10. BlogIcon gucci sneakers 2015.02.12 03:10  수정/삭제  댓글쓰기

    습어Extend Miracle jingle bell band

    We have arrived at the final build from the Louisville Jewellery Examiner's "12 Times associated with Xmas Jewellery Projects associated with 2012. inch Hopefully a person loved the final fourteen days associated with Xmas projects as well as ideas. It had been certainly a larger task compared to We believed prior to We required this upon,authentic burberry outle할선

  11. BlogIcon tory burch reva shoes 2015.02.18 23:10  수정/삭제  댓글쓰기

    되메Worldwide Account with regard to Pet Well being Selects HEWLETT PACKARD

    HEWLETT PACKARD these days introduced how the Worldwide Account with regard to Pet Well being (IFAW) gucci outlet online offers selected HEWLETT PACKARD Converged National infrastructure to aid it's procedures within 15 workplaces all over the world along with enhanced technologies overall performance to satisfy needs assoc일리

  12. BlogIcon louis vuitton handbags 2015.02.20 13:58  수정/삭제  댓글쓰기

    지습Steps to make Angling Fishing lures

    Producing your personal angling fishing lures could be enjoyable,gucci ouelt, satisfying,tory burch outlet, as well as helpful simply because they perform capture seafood really effectively. It's affordable to create all of them and you will make use of wood blanks for example broom deals with or even discard wooden you'll find almost anyplace. Angling fishin려히

  13. BlogIcon fulinglasses review 2015.03.05 17:04  수정/삭제  댓글쓰기

    되메in line with the Mayo Clinic 4out of fiveindividuals within the U.S. will experience low back pain once or more through their lives.

    Back pain is a quite common complaint. it's among the most typical causes for individuals to overlook work or make a visit to the doctor's office,tiffany co sunglasses.

    there's a bright side. maximumback pain can also be prevented and when back pain treatme다로

  14. BlogIcon louis vuitton handbags 2015.03.07 16:31  수정/삭제  댓글쓰기

    한단Chevrolet HHR LS 07 chev hhr rear brakes how do you take shoes

    Refer to Vehicle Lifting,gucci oulet. Remove the tire and wheel assembly. Remove the adjuster assembly (2) from the brake shoes

    Position the hook end of the J 38400 (1) under the universal spring and lightly pull the universal spring end out of the shoe web hole,tory burch outlet. Hold the universal spring while removing the trai한를

  15. BlogIcon new balance womens running shoes 2015.03.19 01:00  수정/삭제  댓글쓰기

    리어Horse soring is really subject related to lively N

    CALIFORNIA Witnesses together with considerably numerous views concerning the level related to dog improper use inside the walking horse company showed up before the congressional cell Thurs, leaving behind several our elected representatives unclear items to believe.

    "It's as you are usually via nfl jerseys wholesale two numerous attributes법어

  16. BlogIcon chaussure louis vuitton homme 2015.03.20 11:08  수정/삭제  댓글쓰기

    리지Disturbance Acrylics,ray ban outlet

    Polymer fresh paint is probably probably the most flexible associated with press,cheap ray bans, it may be diluted along with drinking water as well as used within the type of watercolor or even utilized directly from the pipe in order to imitate essential oil paints. As soon as dried out the actual fresh paint is actually water-resistant and therefore severa를네

  17. BlogIcon chemise burberry femme 2015.03.27 21:10  수정/삭제  댓글쓰기

    분서l'&eacute;tiquette comme une chose importante,Lac de la proximit&eacute; de la surface de Liu Zhuang trois Nord.| | Wei (155 - 220), au d&eacute;but de la guerre de l'Union sovi&eacute;tique, Yang a dit: "il y a un objet,D'autres. Hangzhou femme normale permet de echarpe burberry homme pas cher lire, sa m&egrave;re et sa m&egrave;re l'imp&eacute;ratrice Wu.Tu n'as pas laiss&eacute; la partie r&eac일이

  18. BlogIcon burberry purses 2015.03.29 14:59  수정/삭제  댓글쓰기

    마를film to show Sunday at 2013 QFilm Festival in Long Beach

    LONG BEACH >> Sergio Romero furla outlet knew it would be difficult for his mother to accept that the 37 year old was gay, but it still shocked and hurt him to learn she preferred her son to be an active gang member than to be gay.

    her, I was louis vuitton handbags more of a man as a gang member than being gay, said Romero as he sat in메마

  19. BlogIcon burberry trench sale 2015.04.03 22:10  수정/삭제  댓글쓰기

    가지Report On Magical Realism Warns Of Increased Incidences Of Women's Tears Flooding The Entire World

    NEW YORK that such occurrences pose a grave threat to the global economy and millions of human lives, a report presented Thursday at a United Nations summit on magical realism highlights an alarming increase in incidences in which the whole world is completely flooded by the tears of a grieving wo에관

  20. BlogIcon michael kors wallet sale 2015.04.04 19:55  수정/삭제  댓글쓰기

    마메Proven brutality key to being North Korea's heir apparent

    To be a credible candidate for the leadership of North Korea, a man needs plenty of blood on his hands.

    Overt ruthlessness and a penchant for gratuitous violence are seen as essential leadership qualities in a country whose political culture is founded on the notion that North Korea is under a permanent state of siege by the United St는없

  21. BlogIcon furla online 2015.04.04 21:31  수정/삭제  댓글쓰기

    없부I've the S320 using the tranny within,furla handbags online

    Client: How do i Realize that I have to lso are check out? Basically realize properly,gucci sneakers, I've understand method of understanding in the event that cleaning the actual PCB had been successfull unless of course We obtain an additional check out since the vehicle won't walk out sagging setting by itself? Is actually which pro로비

Powerd by Tistory, designed by criuce
rss