RadWindow as MainWindow - RadWindow doesn't show up

2 posts, 0 answers
  1. Anson
    Anson avatar
    3 posts
    Member since:
    Sep 2015

    Posted 29 Nov 2015 Link to this post

                    Header="RadWindow" Height="1000.098" Width="1315.286"

    This is the MainWindow.xaml


    - I have removed the StartUrl in app.xaml

    - I have changed MainWindow: Window To MainWindow: RadWindow

    protected override void OnStartup(StartupEventArgs e)
        new MainWindow().Show();
    I have added this to app.xaml.cs


    When I run the wpf, a exe is running( as i can see in task manager), but nothing show up.


    This is driving me crazy. Any help would be appreciated

  2. Nasko
    Nasko avatar
    699 posts

    Posted 30 Nov 2015 Link to this post

    Hi Anson,

    If you are using Implicit Styles in order to style your application and apply some theme for it, please notice that the newly created user control (MainWindow that inherits RadWindow in your case) will not receive the default Style of RadWindow - that will cause the observed by you behavior of RadWindow.

    So, in order to fix that you need to add the following Style after the merged dictionaries:
                <ResourceDictionary Source="Themes/System.Windows.xaml" />
                <ResourceDictionary Source="Themes/Telerik.Windows.Controls.xaml" />
                <ResourceDictionary Source="Themes/Telerik.Windows.Controls.Navigation.xaml" />
    <-- the TargetType should be your UserControl (MainWindow) that contains and inherits RadWindow -->
            <Style TargetType="local:MainWindow" BasedOn="{StaticResource RadWindowStyle}" />

    We suggest you to check the following article from our help documentation that provides detailed information how to use RadWindow as UserControl:

    Please, give a try to the proposed above approach and let us know if it worked for you.

    Hope this helps.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top