Radwindow does not close when migrating to Q3 2010

5 posts, 0 answers
  1. Adil
    Adil avatar
    3 posts
    Member since:
    Jun 2010

    Posted 03 Dec 2010 Link to this post

    Hello,
    After migrating from Telerik Telerik Q2 2010 to Q3 2010 wpf, the radWindow does not close properly  after the button 'Valider' is clicked!
    Code :
    Xaml file:

    <UserControl x:Class="gcm.module.consultation.CreationMotifView"

       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"

        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 

        xmlns:infrastructure="clr-namespace:gcm.infrastructure;assembly=gcm.infrastructure"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

       >

        <UserControl.Resources>

            <DataTemplate x:Key="IconTemplate">

                <Image Source="/gcm.resources;component/images/16/Motif.png"

                  Stretch="None" />

            </DataTemplate>

        </UserControl.Resources>

        <telerikNavigation:RadWindow x:Name="window" Header="{x:Static infrastructure:Message.Popup_Motif_header}" WindowStartupLocation="CenterOwner" Margin="10,40,10,10" Height="135"  Width="450"

                               TopOffset="-50" ResizeMode="NoResize"

                               IconTemplate="{StaticResource IconTemplate}">

            <Grid>

                <Grid.Resources>

                    <DataTemplate DataType="{x:Type ValidationError}">

                        <TextBlock

                        FontStyle="Italic"

                        Foreground="Red"

                        HorizontalAlignment="Right"

                        Margin="0,1"

                        Text="{Binding Path=ErrorContent}"

                    />           

                </DataTemplate>

                </Grid.Resources>

                <Grid.ColumnDefinitions>

                    <ColumnDefinition Width="60"/>

                    <ColumnDefinition Width="*"/>

                    <ColumnDefinition Width="120"/>

                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>

                    <RowDefinition Height="30"/>

                    <RowDefinition Height="*"/>

                    <RowDefinition Height="35"/>

                </Grid.RowDefinitions>

                <Label Grid.Column="0" Grid.Row="1" Name="LibelleMotif" Content="{x:Static infrastructure:Message.Motif_Libelle}"></Label>

                <TextBox Grid.Column="1" Grid.Row="1" Name="TxtMotif"

                         Text="{Binding Path=txtMotif, ValidatesOnDataErrors=true, UpdateSourceTrigger=PropertyChanged}"

                         Height="23" Margin="0,0,35,0" VerticalAlignment="Top" TabIndex="0" />

                <ContentPresenter Grid.Row="1" Grid.Column="5"

                     HorizontalAlignment="Left" VerticalAlignment="Top"

                     Content="{Binding ElementName=TxtMotif, Path=(Validation.Errors).CurrentItem}"

                     DockPanel.Dock="Right"/>

                <Button Grid.Column="2" Grid.Row="2" Name="valider" Margin="0,0,33,9"

                        Command="{Binding Path=MotifCommande}" TabIndex="1" >valider</Button>

               

            </Grid>

        </telerikNavigation:RadWindow>

    </UserControl>

    Presenter :

           

    public ICommand MotifCommande

            {

                get

                {

                    if (this.mode == ModeNames.UPDATE)

                    {

                        if (_updateCommand == null)

                        {

                            _updateCommand = new RelayCommand(

                            param => this.updateMotif(),

                            param => this.CanSaveMotif

                            );

                        }

                        return _updateCommand;

                    }

                    else

                    {

                        if (_saveCommand == null)

                        {

                            _saveCommand = new RelayCommand(

                            param => this.createMotif(),

                            param => this.CanSaveMotif

                            );

                        }

                        return _saveCommand;

                    }

                }

            }

                

            public void createMotif()

            {

                try

                {

                    Motif motif = this.GetMotif();

                    _motifRepository.CreateMotif(motif);

                    this.View.window.Close();

                    consultationController.MotifCreated(motif);

                }

                catch (Exception)

                {

                   

                }

               

            }

    bool CanSaveMotif

            {

                get

                {

                    return true;

                }

            }

    any idea?
  2. George
    Admin
    George avatar
    1332 posts

    Posted 03 Dec 2010 Link to this post

    Hello Adil,

    Thank you for contacting us.

    Could you please specify do you use Window7Theme or any other theme? 

    Greetings,
    George
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. UI for WPF is Visual Studio 2017 Ready
  4. Adil
    Adil avatar
    3 posts
    Member since:
    Jun 2010

    Posted 03 Dec 2010 Link to this post

    Hello George,
    Thank you for your quick reply

    Yes I'm using Window7Theme :

    public Shell(IRegionManager regionManager, IUnityContainer container, IEventAggregator eventAggregator, IContextService contextService)

            {

                StyleManager.ApplicationTheme = new Windows7Theme();

                InitializeComponent();

     .....

  5. Adil
    Adil avatar
    3 posts
    Member since:
    Jun 2010

    Posted 06 Dec 2010 Link to this post

    Hello George,
    I can't reproduce the bug in
    Office_BlueTheme, you have an idea to fix the problem in the Window7Theme ?
  6. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 08 Dec 2010 Link to this post

    Hi Adil,

    We were able to reproduce the issue. It was reported from other client as well for WIndows7Theme and 32 bit machine. We are still not sure what is causing this behavior, as we are not able to reproduce it in a simple scenario. It seems that it is somewhat dependant on the Content of the RadWindow.

    I created a PITS item where you can follow the progress of the issue. The ID is 4293.

    Please, excuse us for the inconvenience. We have added points to your account for the report. Don't hesitate to contact us if you have other questions

    All the best,
    Boyan
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
Back to Top
UI for WPF is Visual Studio 2017 Ready