This is a migrated thread and some comments may be shown as answers.
RadWindow.Confirm not centered
15 Answers 145 Views
This is a migrated thread and some comments may be shown as answers.
Chris Thierry
Top achievements
Rank 1
Chris Thierry asked on 22 Sep 2011, 04:36 PM
I'm using RadWindow.Confirm to display a confirm message, this window sometimes is centered, sometimes not... event using DialogStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterOwner.

I have a Radwindow used as UserControl, in this window I have a button, when you press the button the RadWindow.Confirm appears, at that moment, the confirm is showed sometimes centered and sometimes not.

Please check this page: http://demos.telerik.com/silverlight/#Window/APC to confirm the problem.

Do I need to use something different?
Thank you.

15 Answers, 1 is accepted

Sort by
0
Chris Thierry
Top achievements
Rank 1
answered on 27 Sep 2011, 02:17 PM
Please, I need to fix this problem.
Thanks
0
George
Telerik team
answered on 28 Sep 2011, 08:06 AM
Hi Chris,

 
We are aware of this problem with RadWindow control and it is logged in our system. You can track its change and vote for this bug here - http://www.telerik.com/support/pits.aspx#/public/silverlight/7983.

To work around the problem, I would suggest  go handle the Loaded event and set custom values for Top and Left properties in order to center the window manually.


All the best,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Chris Thierry
Top achievements
Rank 1
answered on 28 Sep 2011, 01:46 PM
Hi,
I understand there is a bug, are you planning to fix this problem? Could you give me an example?
Thank you.
0
Chris Thierry
Top achievements
Rank 1
answered on 30 Sep 2011, 02:24 PM
Hi,
Could you please provide me an example?
Thank you.
0
George
Telerik team
answered on 03 Oct 2011, 09:39 AM
Hello Chris,

Please, refer to the attached project that illustrates how to override top and left properties of RadWindow. All you need is to set ContentTemplate for the RadCofirm and handle the Loaded event. In the loaded event handler you could make the necessary calculations and set top/left.

Hope this helps.

Best wishes,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Chris Thierry
Top achievements
Rank 1
answered on 03 Oct 2011, 05:05 PM
HI,
is not working when I already have a RadWindow opens.

My scenario is a RadWindow, already open and when I click in a button, I open a RadConfirm window. The RadConfirm opens but I can't see the window, I only see the title bar.

Please take a look into the attached file.
Thank you.
0
George
Telerik team
answered on 06 Oct 2011, 03:56 PM
Hello Chris,

I tried to reproduce the problem, but to no avail - please, refer to the attached sample. 

Providing us with a sample application in which we can observe the issue will be very helpful in determining the source of the issue.


Greetings,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Chris Thierry
Top achievements
Rank 1
answered on 11 Oct 2011, 04:50 PM
Hi George,
Is working now.
Thank you.
0
Chris Thierry
Top achievements
Rank 1
answered on 11 Oct 2011, 08:35 PM
One more question...
Are you going yo fix this issue in the next version? to avoid adding this code in the app.xaml?
Thank you.
0
Chris Thierry
Top achievements
Rank 1
answered on 12 Oct 2011, 03:30 PM
Hi, I'm using windows 7 theme with the latest version of Telerik RadControls for Silverlight, when I try to open a RadWindow popup, I see a kind of square in the top left corner of the window. Do you know what this is? I send you a capture.
Thank you.
0
George
Telerik team
answered on 13 Oct 2011, 08:23 AM
Hi Chris,

 
We haven't estimated the issue yet and I cannot say when it will be resolved. You could track it in the PITS system, but most probably it won't be done for the Q3 release.

For the problem with the RadWindow in windows 7 theme, I am not able to reproduce it - please, refer to our online examples - http://demos.telerik.com/silverlight/#Window/Theming

Do you use a custom template for the RadWindow? Could you please post it? 

Kind regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Chris Thierry
Top achievements
Rank 1
answered on 13 Oct 2011, 01:50 PM
HI, I'm not using any custom template, just a Radwindow, my OS environment is windows 7,  this is the code:

<telerik:RadWindow x:Class="Etelesolv.Telemanager.TME.UserControls.SelfService.EmployeeEmailWindow"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="400" Height="200"
           Header="">
     
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="35" />
            <RowDefinition Height="*" />
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>
 
        <Border            
            Grid.Row="0"            
            Style="{StaticResource BorderStyleCornerRadiusOnTop}">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFD1D1D1" Offset="0" />
                    <GradientStop Color="#00F5FAFC" Offset="1" />
                </LinearGradientBrush>
            </Border.Background>
            <TextBlock
                x:Name="TextBlockTitle"            
                Text="Update Email"
                TextWrapping="Wrap"
                Margin="10,10,0,5"
                Grid.Column="0"
                Grid.Row="0"           
                Style="{StaticResource ModuleTitleStyle}" />
        </Border>
         
        <Border
            x:Name="BorderEmployee"
            Grid.Column="0"    
            Grid.Row="1"           
            BorderBrush="LightGray"
            BorderThickness="1"           
            Margin="7,5,7,5"
            VerticalAlignment="Stretch">
            <StackPanel Grid.Column="0" Grid.Row="1">
                <sdk:Label Style="{StaticResource Calibri13BoldLabelStyle}"
                    Grid.Column="0"
                    Grid.Row="1"
                    Margin="10,15,10,0"
                    x:Name="lblEMail"
                    Content="E-mail:"
                    VerticalAlignment="Center"/>
 
                <TextBox
                    x:Name="TextBoxEmail"
                    Grid.Column="0"
                    Grid.Row="1"               
                    Margin="10,0,10,0"
                    VerticalAlignment="Center" />
            </StackPanel>
        </Border>      
         
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2">
            <Button x:Name="SaveButton" Content="Save" Click="SaveButton_Click" Width="115" Height="23" Margin="0,0,10,0"/>
            <Button x:Name="SendButton" Content="Send" Click="SendButton_Click" Width="115" Height="23" Margin="0,0,10,0"/>
            <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="115" Height="23" />
        </StackPanel>
    </Grid>
</telerik:RadWindow>

and this is the cs code:

public partial class EmployeeEmailWindow : RadWindow
{
    #region Constructors
    public EmployeeEmailWindow()
    {
        LocalizationManager.Manager = new LocalizationRadControls();
        InitializeComponent();
    }
    #endregion
 
    /// <summary>
    /// Load
    /// </summary>
    /// <param name="employeeId"></param>
    public void Load(int employeeId, string employeeEmail)
    {
        this.ShowDialog();
        this.employeeId = employeeId;
        this.employeeEmail = (string.IsNullOrEmpty(employeeEmail)) ? "": employeeEmail;                       
        this.ConfigControls();
    }//end of Load
 
    /// <summary>
    /// ConfigControls
    /// </summary>
    private void ConfigControls()
    {
        this.TextBoxEmail.Text = employeeEmail;
    }//end of ConfigControls
 
    #region Private/Public Methods
 
    private void SaveButton_Click(object sender, RoutedEventArgs e)
    {
        if (this.IsValidEmail(this.TextBoxEmail.Text))
        {
            InvokeOperation<string> operation =
                context.EmployeeEmailUpdate(this.employeeId, this.TextBoxEmail.Text);
 
        operation.Completed += (s, x) =>
        {
            if (!operation.HasError)
            {
                if (operation.Value == "")
                {
                    MessageBox.Show(TMEGlobals.GetLanguageString("operationSuccessful"));      
                    this.Close();
                    this.OnEmailUpdated();
                }
            }
            else
            {
                MessageBox.Show(operation.Value);
            }
        };
        }
    }
 
    private void SendButton_Click(object sender, RoutedEventArgs e)
    {
         
    }
 
    private bool IsValidEmail(string email)
    {           
        if (string.IsNullOrEmpty(this.TextBoxEmail.Text))
        {
            return true;
        }
         
        if (!Validator.IsValidEmail(this.TextBoxEmail.Text))
        {
            MessageBox.Show(TMEGlobals.GetLanguageString("invalidEmail"));
            return false;
        }           
        return true;
    }
 
    private void CancelButton_Click(object sender, RoutedEventArgs e)
    {
        this.Close();
    }
 
    /// <summary>
    /// OnEmailUpdated
    /// </summary>
    protected virtual void OnEmailUpdated()
    {
        if (EmailUpdated != null)
        {
            EmailUpdated(this, new EventArgs());
        }
    }//end of OnEmailUpdated
 
    #endregion
 
    #region Private/Public Members
 
    public event EventHandler EmailUpdated;
    public string EmployeeEmailChanged;
    private EmployeeDomainContext context = new EmployeeDomainContext();
    private int employeeId;
    private string employeeEmail;
             
    #endregion               
}


Thank you.

 
0
George
Telerik team
answered on 18 Oct 2011, 10:02 AM
Hi Chris,

I tried to reproduce the problem with the provided code, but to no avail. You can find attached the sample plus a demo. Please, let me know if I do something wrong.

Kind regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Chris Thierry
Top achievements
Rank 1
answered on 18 Oct 2011, 02:03 PM
Hi, George,

Even with your example... I see the square in the top left corner of the window. Try to open the same example, but change before the background of your page to black (not the radwindow). You will be able to see it.
Thank you.
0
George
Telerik team
answered on 21 Oct 2011, 10:16 AM
Hello Chris,

I can confirm that this bug is fixed for the Q3 Beta release. Please, download and give it a try and let me know if you still encounter any issues with the RadWindow control.

I am glad to assist you further.

All the best,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Asked by
Chris Thierry
Top achievements
Rank 1
Answers by
Chris Thierry
Top achievements
Rank 1
George
Telerik team
Share this question
or