• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            萬星星@豌豆莢 歡迎加入我們
            一個(gè)吃軟飯的男人!!!!!我只想寫程序####
            微博:http://weibo.com/wanlianwen
            posts - 172,  comments - 1253,  trackbacks - 0
            所有的C++程序員們,讓我們來體驗(yàn)Windows Vista 開發(fā)平臺(tái)吧!
            Win32??到 WinFX? 的進(jìn)步開始于 Windows Vista 時(shí)代對(duì) .NET Framework 的改進(jìn)。這兩種編程模型使每個(gè)開發(fā)人員都關(guān)注著 Windows Vista 的改進(jìn),包括改進(jìn)的顯示和通信子系統(tǒng)、改進(jìn)的連通性以及 Windows 在核心安全性、可管理性和可靠性方面的重要改進(jìn)。
            前幾天在msdn中文網(wǎng)站下了幾部wencast講座,主要關(guān)注了下WinFX,個(gè)人覺得學(xué)到不少新思想,地址:http://www.microsoft.com/china/msdn/events/webcasts/shared/Webcast/MSDNWebCast.aspx

            WinFX包括3個(gè)重要思想:
            WPF(Windows Presentation Foundation):界面表現(xiàn)基礎(chǔ)。在我的我心中最美的軟件框架 一篇中,曾經(jīng)提到軟件設(shè)計(jì)框架,當(dāng)時(shí)有人提到腳本技術(shù)做界面。以前VC的開發(fā)思維中,做界面一味依靠界面庫(BCG或者XTREME等)或GDI(自己繪制窗口),而沒有考慮過多種開發(fā)語言的結(jié)合,利用不同語言揚(yáng)長避短。在去年年末的一個(gè)界面設(shè)計(jì)中,我終于苦惱了,開始想結(jié)合HTML和WebBrowser控件實(shí)現(xiàn)漂亮界面,也獲得了一些成果,但是沒有運(yùn)用到開發(fā)中去, (運(yùn)用HTML例子) 。微軟的這項(xiàng)技術(shù)是利用DirectX技術(shù)來渲染界面,達(dá)到各種各樣的異形界面效果。

            WCF(Windows Communication Foundation):不同平臺(tái)上運(yùn)行的應(yīng)用程序之間支持基本的互操作性且確保端對(duì)端安全和可靠通信的前提下完成這種互操作。本人對(duì)這個(gè)了解不多,這里有一篇講WCF的:http://www.cnblogs.com/wayfarer/archive/2006/04/05/367474.html

            WFF(Windows FlowWork Foundation):底層實(shí)現(xiàn)工作流基礎(chǔ)。剛用C語言編程的時(shí)候,老師讓我們先畫流程圖。WFF技術(shù)正是基于這樣一種思想,把流程圖作為前端,代碼作為后端。在前端繪制流出(if-else, while, for等),通過點(diǎn)擊節(jié)點(diǎn)實(shí)現(xiàn)后端代碼,可以說工作流繪制出來,程序框架也就搭建好了,剩下來就是在框架里面添代碼。

            本人對(duì)界面比較感興趣,所以主要想研究WPF。
            下面開始開發(fā)環(huán)境的配置:
            1、WinFX Runtime不支持WIN2K以及以下OS版本,XP或者2K3支持。為了確保不出問題,我選擇2K3,在安裝時(shí)候不小心搞壞了以前的2K OS,害的我整整花了一天時(shí)間。
            2、下載WinFX Runtime,這個(gè)大約43M,在微軟官方網(wǎng)站下載:http://www.microsoft.com/downloads/details.aspx?FamilyId=F51C4D96-9AEA-474F-86D3-172BFA3B828B&displaylang=en
            注意不要下載上面那個(gè)網(wǎng)絡(luò)安裝,頁面拉下去下載這里:
            for x86 or for x64 which are both .EXE files(鏈接可能失效,因?yàn)楫吘故荁eta版本,時(shí)常更新)。
            這個(gè)是安裝os后緊接著安裝的,會(huì)提示安裝.NET 2.0 FrameWork。我得Win2k3里面就有,沒有的可以裝VS2005里面的,但是千萬不要安裝VS2005。
            3、下載WinFX SDK,這個(gè)大約1.1G,在微軟官方網(wǎng)站下載:
            http://www.microsoft.com/downloads/details.aspx?FamilyId=9BE1FC7F-0542-47F1-88DD-61E3EF88C402&displaylang=en
            下載完后,安裝。
            4、安裝VS2005。
            這樣基本把環(huán)境搭建好了。WinFX SDK安裝會(huì)在Program Files目錄下生成一個(gè)Microsoft SDKs目錄,進(jìn)去在\Windows\v1.0\samples下面找到AllWinFXsamples.zip,打開如下圖:

            進(jìn)入WindowsPresentationFoundation,如下圖:

            里面例子真不少,隨便找一個(gè)例子,我解壓Gallery\SamplesGallery。用VS2005打開,編譯,應(yīng)該很快。然后在bin目錄下找到exe執(zhí)行,看看下面的界面吧!(VS2005目前不支持解決方案直接拖放功能,每次打開一個(gè)關(guān)閉,非常麻煩)


            今天編譯一個(gè)\WindowsPresentationFoundation\GraphicsMM_Brushes\UsingImageBrush,覺得不錯(cuò),把界面貼上來:








            WPF基于XAML語言,參看另一篇Blog:WinFX編程模型
            下面是一個(gè)XAML文件,里面描述了界面。
            <!--?This?example?shows?how?to?use?an?ImageBrush?to?fill?text.?-->
            <Page?xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            ??xmlns:x
            ="http://schemas.microsoft.com/winfx/2006/xaml"
            ??x:Class
            ="Microsoft.Samples.Graphics.UsingImageBrush.TextFillsExample">

            ??
            <Grid?Margin="20">

            ????
            <Grid.ColumnDefinitions>
            ??????
            <ColumnDefinition?Width="Auto"/>
            ??????
            <ColumnDefinition?Width="Auto"/>
            ??????
            <ColumnDefinition?Width="Auto"?/>
            ????
            </Grid.ColumnDefinitions>
            ????
            ????
            <Grid.RowDefinitions>
            ??????
            <RowDefinition?Height="Auto"?/>
            ??????
            <RowDefinition?Height="Auto"?/>
            ??????
            <RowDefinition?Height="Auto"?/>
            ??????
            <RowDefinition?Height="Auto"?/>
            ??????
            <RowDefinition?Height="Auto"?/>
            ????
            </Grid.RowDefinitions>

            ????
            <TextBlock?Grid.Row="2"?Grid.Column="1"
            ??????FontSize
            ="70pt"?FontWeight="Bold"??FontFamily="Verdana"
            ??????Margin
            ="10">
            ??????
            <TextBlock.Foreground>
            ????????
            <ImageBrush
            ??????????
            ImageSource="sampleImages\purpleblock.jpg"></ImageBrush>
            ??????
            </TextBlock.Foreground>
            ??????Text
            ????
            </TextBlock>
            ????
            <TextBlock?Grid.Row="2"?Grid.Column="2"
            ??????FontSize
            ="70pt"?FontWeight="Bold"??FontFamily="Verdana"
            ??????Margin
            ="10">
            ??????
            <TextBlock.Foreground>
            ????????
            <ImageBrush
            ??????????
            Viewport="0,0,25,25"?ViewportUnits="Absolute"
            ??????????TileMode
            ="Tile"
            ??????????ImageSource
            ="sampleImages\purpleblock.jpg"></ImageBrush>
            ??????
            </TextBlock.Foreground>
            ??????Text
            ????
            </TextBlock>


            ????
            <TextBlock?Grid.Row="3"?Grid.Column="1"
            ??????FontSize
            ="70pt"?FontWeight="Bold"??FontFamily="Verdana"
            ??????Margin
            ="10">
            ??????
            <TextBlock.Foreground>
            ????????
            <ImageBrush
            ??????????
            ImageSource="sampleImages\square.jpg"></ImageBrush>
            ??????
            </TextBlock.Foreground>
            ??????Text
            ????
            </TextBlock>
            ????
            <TextBlock?Grid.Row="3"?Grid.Column="2"
            ??????FontSize
            ="70pt"?FontWeight="Bold"??FontFamily="Verdana"
            ??????Margin
            ="10">
            ??????
            <TextBlock.Foreground>
            ????????
            <ImageBrush
            ??????????
            Viewport="0,0,25,25"?ViewportUnits="Absolute"
            ??????????TileMode
            ="Tile"
            ??????????ImageSource
            ="sampleImages\square.jpg"></ImageBrush>
            ??????
            </TextBlock.Foreground>
            ??????Text
            ????
            </TextBlock>


            ????
            <TextBlock?Grid.Row="4"?Grid.Column="1"
            ??????FontSize
            ="70pt"?FontWeight="Bold"??FontFamily="Verdana"
            ??????Margin
            ="10">
            ??????
            <TextBlock.Foreground>
            ????????
            <ImageBrush
            ??????????
            ImageSource="sampleImages\pinkcherries.jpg"></ImageBrush>
            ??????
            </TextBlock.Foreground>
            ??????Text
            ????
            </TextBlock>

            ????
            <TextBlock?Grid.Row="4"?Grid.Column="2"
            ??????FontSize
            ="70pt"?FontWeight="Bold"??FontFamily="Verdana"
            ??????Margin
            ="10">
            ??????
            <TextBlock.Foreground>
            ????????
            <ImageBrush
            ??????????
            Viewport="0,0,25,25"
            ??????????ViewportUnits
            ="Absolute"
            ??????????TileMode
            ="Tile"
            ??????????ImageSource
            ="sampleImages\pinkcherries.jpg"></ImageBrush>
            ??????
            </TextBlock.Foreground>
            ??????Text
            ????
            </TextBlock>

            ????
            <!--?Describes?the?sample.?-->
            ????
            <Rectangle?Grid.Row="0"?Grid.Column="0"?Grid.ColumnSpan="3"
            ??????Stroke
            ="LimeGreen"?StrokeThickness="6">
            ??????
            <Rectangle.Fill>
            ????????
            <LinearGradientBrush?StartPoint="0,0.5"?EndPoint="1,0.5">
            ??????????
            <LinearGradientBrush.GradientStops>
            ????????????
            <GradientStop?Offset="0.0"?Color="LimeGreen"?/>
            ????????????
            <GradientStop?Offset="1.0"?Color="Yellow"?/>
            ??????????
            </LinearGradientBrush.GradientStops>
            ????????
            </LinearGradientBrush>
            ??????
            </Rectangle.Fill>
            ????
            </Rectangle>
            ????
            <TextBlock?Grid.Row="0"?Grid.Column="0"?Grid.ColumnSpan="3"??
            ??????Margin
            ="10"?MaxWidth="400"??HorizontalAlignment="Left">
            ??????An?ImageBrush?may?be?used?to?paint?text.?The?following?examples?show
            ??????an?image?used?to?fill?text?with?and?without?tiling.
            ????
            </TextBlock>
            ????
            <TextBlock?Grid.Row="1"?Grid.Column="0"?FontWeight="Bold"?Margin="10">The?Image</TextBlock>
            ????
            <TextBlock?Grid.Row="1"?Grid.Column="1"?FontWeight="Bold"?Margin="10">Applied?to?Text?Without?Tiling</TextBlock>
            ????
            <TextBlock?Grid.Row="1"?Grid.Column="2"?FontWeight="Bold"?Margin="10">Applied?to?Text?With?Tiling</TextBlock>

            ????
            <!--?Shows?what?the?images?look?like?on?their?own.?-->
            ????
            <Image?Grid.Row="2"?Grid.Column="0"?Source="sampleImages\purpleblock.jpg"?Height="100"?Width="100"
            ??????HorizontalAlignment
            ="Left"?Margin="10"/>
            ????
            <Image?Grid.Row="3"?Grid.Column="0"?Source="sampleImages\square.jpg"?Height="100"?Width="100"?
            ??????HorizontalAlignment
            ="Left"?Margin="10"?/>
            ????
            <Image?Grid.Row="4"?Grid.Column="0"?Source="sampleImages\pinkcherries.jpg"?Height="100"?Width="100"
            ??????HorizontalAlignment
            ="Left"?Margin="10"?/>
            ??
            </Grid>
            </Page>
            posted on 2006-04-11 23:39 萬連文 閱讀(1894) 評(píng)論(2)  編輯 收藏 引用 所屬分類: .NET

            FeedBack:
            # re: .NET2.0--WinFX初體驗(yàn)
            2006-04-26 19:55 | pighead
            (運(yùn)用HTML例子)--------
            請(qǐng)問這個(gè)例子的源代碼可以提供一下嗎?謝謝
            whwjn@163.com  回復(fù)  更多評(píng)論
              
            # re: .NET2.0--WinFX初體驗(yàn)
            2007-08-06 22:38 | AIBPXTSHMF
            說實(shí)話,真的不太喜歡這樣的東西  回復(fù)  更多評(píng)論
              
            簡歷下載
            聯(lián)系我

            <2006年7月>
            2526272829301
            2345678
            9101112131415
            16171819202122
            23242526272829
            303112345

            常用鏈接

            留言簿(66)

            隨筆分類

            隨筆檔案

            相冊(cè)

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            99久久精品免费看国产| 亚洲国产成人久久综合碰碰动漫3d | 国产精品福利一区二区久久| 国产成人精品综合久久久久 | 99久久综合国产精品免费| 久久久久一级精品亚洲国产成人综合AV区| 国产精品女同一区二区久久| 久久se这里只有精品| 伊人久久大香线蕉AV色婷婷色| 91精品国产综合久久精品| 内射无码专区久久亚洲| 国产成人精品免费久久久久| 久久国产成人午夜aⅴ影院| 日韩精品久久无码人妻中文字幕| 99久久无码一区人妻| 婷婷久久香蕉五月综合加勒比| 久久久精品国产亚洲成人满18免费网站 | 亚洲国产精品无码久久98| 国产—久久香蕉国产线看观看| 伊人久久综合无码成人网| 婷婷久久五月天| 久久精品国产亚洲Aⅴ蜜臀色欲| 亚洲精品国产美女久久久| 婷婷久久综合| 久久毛片免费看一区二区三区| 久久精品人人做人人爽97| 99久久精品国产一区二区| 亚洲七七久久精品中文国产| 久久国产一区二区| 久久91综合国产91久久精品| 日韩人妻无码精品久久免费一| 国产69精品久久久久APP下载| 久久99精品久久久久久9蜜桃| 婷婷综合久久狠狠色99h| 99精品久久精品一区二区| 久久精品无码专区免费青青| 亚洲va中文字幕无码久久| 亚洲愉拍99热成人精品热久久| 精品多毛少妇人妻AV免费久久| 午夜精品久久久久久| 久久综合久久美利坚合众国|