在无纸化会议系统客户端的使用过程中,需要使用提示框来进行提示,由于原生的MessageBox太过简陋,缺乏美观,所以我们需要自定义一个提示框来进行信息的提示,自定义的提示框实例如下图所示:
自定义的MessageBox由四部分组成,最上面是标题栏,中间左边是提示框的图标(有好几种,可以自己选择,也可以不选择图标),中间右边是提示信息,最下面是按钮,按钮也分好几种,有确定,取消,是,否,或者是无。前端部分代码如下所示:
<Border Grid.Row="0" Background="#EF4045" CornerRadius="15,15,0,0" Margin="0,0,-0.666,30">
<TextBlock Margin="30,15,30,15" Foreground="White" FontSize="25" RenderTransformOrigin="1,-0.05">提示</TextBlock>
</Border>
<!--图片和文本-->
<StackPanel Grid.Row="1" VerticalAlignment="Center" Orientation="Horizontal">
<Image Source="{Binding ImagePath}" Width="110" Height="116" Margin="80,40,40,40"/>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" TextWrapping="WrapWithOverflow"
Width="560" TextAlignment="Left" Text="{Binding MessageBoxText}" FontSize="25"/>
</StackPanel>
<!--按钮-->
&l