亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何從代碼運行對話框?

如何從代碼運行對話框?

C#
catspeake 2021-05-04 16:13:44
我正在使用材料設計對ac#應用程序進行編碼這是我的UserControl的xaml代碼:<UserControl         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"          xmlns:local="clr-namespace:MediCare"         xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" x:Name="Usc1" "         mc:Ignorable="d" Height="900" Width="600"><materialDesign:DialogHost x:Name="Dialog" >    <materialDesign:DialogHost.DialogContent>        <Grid Width="300" Height="100">            <TextBlock Text="DIALOG TEST"/>            <Button Command="{x:StaticmaterialDesign:DialogHost.CloseDialogCommand}" Content="CloseDialog"/>        </Grid>    </materialDesign:DialogHost.DialogContent>    <Grid>          <Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" Content="CloseDialog" />    </Grid></materialDesign:DialogHost>我有一個帶有命令的按鈕Command="{x:Static  materialDesign:DialogHost.OpenDialogCommand}"來打開我的對話框,但是我的目的是通過.xaml.cs打開它,我該怎么辦?
查看完整描述

1 回答

?
慕斯709654

TA貢獻1840條經驗 獲得超5個贊

我得到了顯示的對話框 Dialog.IsOpen = true;


查看完整回答
反對 回復 2021-05-08
  • 1 回答
  • 0 關注
  • 209 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號