Blazor的Telerik UI?下载30天免费试用

对话框操作按钮

对话框为操作按钮提供了一个专用区域。它们使应用程序能够向用户提供特定的交互。

要在对话框中指定操作按钮,请使用DialogButtons标签。

按钮的布局

“对话框”操作按钮可以呈现几种不同的布局配置。这取决于ButtonsLayout组件参数。它期望的是DialogButtonsLayout枚举:

  • 开始
  • 中心
  • 结束
  • 拉伸(默认值)

例子

下面的示例演示了“对话框”操作按钮支持的所有布局选项。

使用对话框按钮攻击

      Cancel OK   @code {private TelerikDialog dialog {get;设置;} private bool DialogVisible {get;设置;} = true;private dialogbuttonlayout SelectedButtonLayout {get;设置;} = DialogButtonsLayout.End;OnRadioChange(object newValue) {dialgref . refresh ();//需要Refresh()来重新呈现对话框内容。 } private List ButtonLayouts { get; set; } = new List() { new DialogModel() { Text = "Start", Value = DialogButtonsLayout.Start }, new DialogModel() { Text = "End", Value = DialogButtonsLayout.End }, new DialogModel() { Text = "Center", Value = DialogButtonsLayout.Center }, new DialogModel() { Text = "Stretch", Value = DialogButtonsLayout.Stretch } }; public class DialogModel { public string Text { get; set; } public DialogButtonsLayout Value { get; set; } } }
在本文中
Baidu
map