我正在寻找一个纯粹的radwindow确认对话框,该对话框仅保留Content和YesNoButton。我没有找到任何可以关闭这些属性的属性。我怎样才能做到这一点?我尝试了这个:
public void ShowConfirm()
{
RadWindow.Confirm(new DialogParameters()
{
Header = "",
Content = new TextBlock()
{
MaxWidth = 200,
Background = new SolidColorBrush(Colors.Red),
Foreground = new SolidColorBrush(Colors.Black),
TextWrapping = TextWrapping.Wrap,
Text = "Test",
FontSize = 24
},
Closed = OnClosed,
WindowStyle = this.Resources["ConfirmDialog"] as Style
});
}
private void OnClosed(object sender, WindowClosedEventArgs e)
{
var result = e.DialogResult;
if (result == true)
{
//
}
}
<Style x:Key="checkWeekDialog" TargetType="telerik:RadWindow">
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="Width" Value="400"/>
<Setter Property="Background" Value="Yellow"/>
<Setter Property="MinHeight" Value="300"/>
<Setter Property="Icon" Value=""/>
<!--<Setter Property="WindowStartupLocation" Value="CenterOwner"/>-->
<Setter Property="SnapsToDevicePixels" Value="True"/>
</Style>
答案 0 :(得分:0)
隐藏RadConfirm组件标题栏的一种方法是通过RadWindowManager的VisibleTitlebar属性:
另一种方法是通过CSS和此类:
.rwTitlebarControls { 显示:无!重要; }