我正在使用材料设计对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打开它,我该怎么办?
添加回答
举报
0/150
提交
取消