New to Telerik UI for WPF? Start a free 30-day trial
How to Use RadWindow as MainWindow
Updated on Oct 8, 2025
Environment
| Product Version | 2019.1.220 |
| Product | RadWindow for WPF and Silverlight |
Description
How to Use RadWindow as MainWindow.
Solution
1. First open the MainWindow.xaml file and replace the Window declaration with a RadWindow declaration:
XAML
<telerik:RadWindow x:Class="RadWindowAsMainWindow.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Header="MainWindow" Height="350" Width="525">
...
</telerik:RadWindow>
and in code-behind:
C#
public partial class MainWindow : RadWindow
{
}
2. Remove StartupUri from the Application definition inside App.xaml:
XAML
<Application x:Class="RadWindowAsMainWindow.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
...
3. Then override the OnStartup method of the Application class to show the RadWindow:
C#
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
new MainWindow().Show();
base.OnStartup(e);
}
}