Silverlight 子視窗檔案和導航專案

2021-09-11 03:33:35 字數 1721 閱讀 8009

在silverlight3的專案中已經新增了childwindow 的檔案,用來建立乙個子視窗,乙個模態視窗,用來相識更加豐富的資訊互動。

預設我們會得到以下的xaml內容,可以看到他的ns是controls,我們可以在其中包含你想要包含的xaml元素

<

controls

:childwindow x:

class

="sample.chapter12.childwindow1"

xmlns

=""

xmlns:x

=""

xmlns

:controls

="clr-namespace:system.windows.controls;assembly=system.windows.controls"

width

="400"

height

="300"

title

="childwindow1">

<

grid x:

name

="layoutroot"

margin

="2">

<

grid.rowdefinitions

>

<

rowdefinition

/>

<

rowdefinition

height

="auto" />

grid.rowdefinitions

>

<

button x:

name

="cancelbutton"

content

="cancel"

click

="cancelbutton_click"

width

="75"

height

="23"

horizontalalignment

="right"

margin

="0,12,0,0"

grid.row

="1" />

<

button x:

name

="okbutton"

content

="ok"

click

="okbutton_click"

width

="75"

height

="23"

horizontalalignment

="right"

margin

="0,12,79,0"

grid.row

="1" />

grid

>

controls

:childwindow

>

彈出子視窗的主視窗**很簡單

private void button_click(object sender, routedeventargs e)

;//顯?示?子ó窗°口ú

mywin.show();

}

posted on

2010-02-18 21:33

...)

編輯收藏

Silverlight 子視窗檔案和導航專案

在silverlight3的專案中已經新增了childwindow 的檔案,用來建立乙個子視窗,乙個模態視窗,用來相識更加豐富的資訊互動。預設我們會得到以下的xaml內容,可以看到他的ns是controls,我們可以在其中包含你想要包含的xaml元素 controls childwindow x c...

Silverlight中匯出Excel檔案

可匯出csv格式檔案,用excel開啟 csv格式化 資料 格式化資料 private static string formatcsvfield string data data.replace replace n replace r 獲取datagrid資料,返回stringbuilder型別資料...

子視窗呼叫父視窗

相信學計算機的大學生都碰過這樣的程式設計作業吧 程式執行後主視窗隱藏,然後彈出登入框,輸入賬號密碼登陸成功後再關閉登陸框,然後讓之前隱藏的主視窗重新顯示。沒錯,我當時就是這麼笨,怎麼都想不到好的解決辦法 當時的同學都是不管之前隱藏的主視窗,而是直接新建了乙個主視窗 剛好昨晚在做專案時碰到類似的情況,...