RadWindow.Confirm not centered

16 posts, 0 answers
  1. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 22 Sep 2011 Link to this post

    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.
  2. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 27 Sep 2011 Link to this post

    Please, I need to fix this problem.
    Thanks
  3. DevCraft banner
  4. George
    Admin
    George avatar
    1332 posts

    Posted 28 Sep 2011 Link to this post

    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 >>

  5. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 28 Sep 2011 Link to this post

    Hi,
    I understand there is a bug, are you planning to fix this problem? Could you give me an example?
    Thank you.
  6. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 30 Sep 2011 Link to this post

    Hi,
    Could you please provide me an example?
    Thank you.
  7. George
    Admin
    George avatar
    1332 posts

    Posted 03 Oct 2011 Link to this post

    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 >>

  8. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 03 Oct 2011 Link to this post

    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.
  9. George
    Admin
    George avatar
    1332 posts

    Posted 06 Oct 2011 Link to this post

    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 >>

  10. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 11 Oct 2011 Link to this post

    Hi George,
    Is working now.
    Thank you.
  11. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 11 Oct 2011 Link to this post

    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.
  12. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 12 Oct 2011 Link to this post

    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.
  13. George
    Admin
    George avatar
    1332 posts

    Posted 13 Oct 2011 Link to this post

    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 >>

  14. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 13 Oct 2011 Link to this post

    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.

     
  15. George
    Admin
    George avatar
    1332 posts

    Posted 18 Oct 2011 Link to this post

    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 >>

  16. Chris Thierry
    Chris Thierry avatar
    138 posts
    Member since:
    Jun 2010

    Posted 18 Oct 2011 Link to this post

    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.
  17. George
    Admin
    George avatar
    1332 posts

    Posted 21 Oct 2011 Link to this post

    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 >>

Back to Top
DevCraft banner