This is a migrated thread and some comments may be shown as answers.

Unable to maximize RadWindow

2 Answers 13 Views
Window
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 12 Apr 2021, 06:00 PM

Hello, i tried to create radWindow as main window. I followed Your tutorial and it working well, except maximizing of window. When maximize button is pressed, then it only move to top left corner, but app itself stays in same size. Attached screenshot of maximized window. 

<telerik:RadWindow x:Name="MainWin1" x:Class="BORIS_OIL.MainWin"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:local="clr-namespace:BORIS_OIL"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:lang = "clr-namespace:BORIS_OIL.Properties"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:navigation="clr-namespace:Telerik.Windows.Controls.Navigation;assembly=Telerik.Windows.Controls.Navigation"
        navigation:RadWindowInteropHelper.ShowInTaskbar="True"
        navigation:RadWindowInteropHelper.Icon="/Resources/aspera.ico"
        
        Header="{x:Static lang:Resources.App_Name}"  HorizontalAlignment="Center" VerticalAlignment="Center" WindowStartupLocation="CenterScreen" MinWidth="1366" MinHeight="768"  ResizeMode="CanResize" 
                >
    <telerik:RadWindow.Resources>
        
        <local:MainMenuViewModel x:Key="ViewModel" />
        <telerik:StringToGlyphConverter x:Key="StringToGlyphConverter" />

        <Style TargetType="telerik:RadNavigationViewItem" >
            <Setter Property="Content" Value="{Binding Title}" />
            <Setter Property="Icon" Value="{Binding IconGlyph}" />
            <Setter Property="IconTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <telerik:RadGlyph Glyph="{Binding Converter={StaticResource StringToGlyphConverter}}" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <DataTemplate x:Key="TransitionControlContentTemplate">
            <TextBlock Margin="10" Text="{Binding Title}" />
        </DataTemplate>

    </telerik:RadWindow.Resources>
    
    <Grid>
        <telerik:RadNavigationView DataContext="{StaticResource ViewModel}"  ItemsSource="{Binding Items}" PaneHeader="Menu" >
            <telerik:RadNavigationView.Content>
                <telerik:RadTransitionControl Content="{Binding SelectedItem, RelativeSource={RelativeSource AncestorType=telerik:RadNavigationView}}" ContentTemplate="{StaticResource TransitionControlContentTemplate}" Foreground="Black" Duration="0:0:0.4">
                    <telerik:RadTransitionControl.Transition>
                        <telerik:FadeTransition />
                    </telerik:RadTransitionControl.Transition>
                </telerik:RadTransitionControl>
            </telerik:RadNavigationView.Content>
        </telerik:RadNavigationView>
    </Grid>
    

2 Answers, 1 is accepted

Sort by
0
n/a
Top achievements
Rank 1
answered on 13 Apr 2021, 10:22 AM
Opened ticket 1515157
0
Dinko
Telerik team
answered on 15 Apr 2021, 09:36 AM

Hi Tomas,

Thank you for the provided details.

We have already replied to your question in the support ticket. I am pasting the answer also here so that the community can take advantage of it.

I was able to observe the described behavior. The HorizontalAlignment and VerticalAlignment properties of the RadWindow are set. These properties are preventing the window from maximizing and work properly. I would suggest avoiding setting these properties. To center the window you can set the WindowStartupLocation property to CenterScreen.

Regards,
Dinko
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Window
Asked by
n/a
Top achievements
Rank 1
Answers by
n/a
Top achievements
Rank 1
Dinko
Telerik team
Share this question
or