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

RadWindow display error

7 Answers 57 Views
Window
This is a migrated thread and some comments may be shown as answers.
Lindsay Miles
Top achievements
Rank 1
Lindsay Miles asked on 20 May 2013, 07:25 PM
Hello,

I have a RadWindow which I initialise in code then display it.

This had been working until early last year and the last build at that time still works. I updated to version 2013.1.403.1050 in the hope of fixing the issue as it started occuring with the previous update(s) 2012.2.6x and continued with 2012.2.9x

I've not updated or been able to release an update this particular application for some time because of this but now it has become imperative that I get this working.

The markup for the window has not changed at all and all I'm doing is filling it with a couple RadRadioButtons and regular buttons without any errors.

I call [myWindow].ShowDialogue(); in code and get an error (caught in catch) but then it does display, however, no other RadWindow will display after that.

I commented out all window contents to see if something was now causing an error but the RadWindow still throws an error.

Please explain what is going wrong here. The RadWindow is definitely at fault here.
Again, MY code and markup has not changed at all!

Using Windows 7, Silverlight 5 and all the latest updates to Visual Studio, .Net etc, etc.

This is the Stack Trace:   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, DependencyObject doh)
   at MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
   at System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
   at System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at System.Windows.Controls.ContentPresenter.set_Content(Object value)
   at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Setup(IWindowDragAware window)
   at Telerik.Windows.Controls.InternalWindow.WindowHostFactory.GetWindowHost(WindowBase window)
   at Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
   at Telerik.Windows.Controls.RadWindow.ShowDialog()
   at [myCompany].[myApp]_Xap.Page.ShowSportDialogue(String sSport)

7 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 23 May 2013, 08:26 AM
Hello,

We are not aware of such issue in the RadWindow control.

Could you share with us more details on the approach of showing the Window, have you made customizations to it? If you could reproduce the issue in a sample project and send it to us in a support thread it would be of much help in being able to observe the issue on our side and see what could be the cause of it.

Regards,
Vladi
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Lindsay Miles
Top achievements
Rank 1
answered on 23 May 2013, 11:20 AM
Vladi, this is simple stuff.

I have a MainPage in my SL project. Add a RadWindow to the markup. Add two option buttons and regular buttons to that.

In code MyRadWindow.Show() or MyRadWindow.ShowDialogue() breaks as per the error shown.

Error is caught/cleared in my catch, THAT window appears but no other RadWindow will show after that.

Tried cleaning the project etc. no fix there. Cannot get to the bottom of this.

Not much more I can tell you. Really!



0
Vladi
Telerik team
answered on 27 May 2013, 01:58 PM
Hi,

I recorded a shot video showing how opening a RadWindow runs on our side. As the video shows there isn't any unexpected behavior.

Please let us know if we have missed something, it is best if you could send us a runnable sample project that recreates the issue in order for us to observe the issue and see what could b the cause of it.

Regards,
Vladi
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Lindsay Miles
Top achievements
Rank 1
answered on 27 May 2013, 02:26 PM
Hi Vladi,

thanks for the video.

I can't send project as-is as it is, the moment I can I will create a sample project and try recreate the error.
Will post again with any findings I come up with, success or fail.

Thanks
0
Lindsay Miles
Top achievements
Rank 1
answered on 19 Sep 2013, 12:34 AM
Vladi, it has been a while but I'm back on this for a bit.
This might shed some light on the issue...

I have a RadWindow defined as a child in one of my screens.
<telerikNavigation:RadWindow WindowStartupLocation="CenterOwner" x:Name="TCColorPicker" Width="216" Height="237" Header="TCColours" VerticalAlignment="Center" HorizontalAlignment="Left" ResizeMode="NoResize" >
    <Grid Height="200" IsHitTestVisible="True" ShowGridLines="False" UseLayoutRounding="False" HorizontalAlignment="Center" VerticalAlignment="Top" Width="200" Margin="0">
        <telerikInput:RadColorSelector Height="200" HorizontalAlignment="Left" Margin="0" Name="radColorSelector1" VerticalAlignment="Top" Width="200" StandardPalette="Standard" MainPalette="Aspect" SelectedColorChanged="radColorSelector1_SelectedColorChanged" />
    </Grid>
</telerikNavigation:RadWindow>

I fire this code on button_click()
private void btnColorPicker_Click(object sender, RoutedEventArgs e)
{
    TCColorPicker.ShowDialog();
}

All telerik controls used are v2013.2.611.1050 runtime version v4.0.30319

I'm getting an error (see below) when firing TCColorPicker.ShowDialog();

Also, in a different event trying to close the RadWindow, TCColorPicker.Close() does not fire when executed.
I need to do this: TCColorPicker.Visibility = System.Windows.Visibility.Collapsed;

RadWindow isn't behaving as it has done in the past and it has been a while since I've looked at this code.
I do have a live app running for customers that I went live with in 2010. It is minor but I'd like to start fixing things and add features but this is just not working well now. Using vs2012 on Windows8, targeting SL 5.0




{System.ArgumentException: Value does not fall within the expected range.
   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.SetValue(IManagedPeerBase obj, DependencyProperty property, DependencyObject doh)
   at MS.Internal.XcpImports.SetValue(IManagedPeerBase doh, DependencyProperty property, Object obj)
   at System.Windows.DependencyObject.SetObjectValueToCore(DependencyProperty dp, Object value)
   at System.Windows.DependencyObject.SetEffectiveValue(DependencyProperty property, EffectiveValueEntry& newEntry, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isBindingInStyleSetter)
   at System.Windows.Controls.ContentPresenter.set_Content(Object value)
   at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Setup(IWindowDragAware window)
   at Telerik.Windows.Controls.InternalWindow.WindowHostFactory.GetWindowHost(WindowBase window)
   at Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
   at Telerik.Windows.Controls.RadWindow.ShowDialog()
   at MyCompany.MyApp.btnColorPicker_Click(Object sender, RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at Telerik.Windows.Controls.RadButton.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)}
0
Vladi
Telerik team
answered on 19 Sep 2013, 12:54 PM
Hi,

As we see that the first version in which this approach is an very old one there have been many changes since then. I noticed that you are using the RadWindows x:Name (TCColorPicker) to call the ShowDialog(). When the RadWindow is created as a separate UserControl the correct way of accessing it is by creating an object of that class and call the ShowDialog() on that object rather than via the x:Name. It is possible that this is causing the issues.

I created a sample project for you with the code snippets that shows there is not unexpected behavior or exceptions when calling the ShowDialog, Show or Close methods of the RadWindow.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Lindsay Miles
Top achievements
Rank 1
answered on 19 Sep 2013, 01:25 PM
Thanks Vladi,

That is a big help. I will amend all instances of RadWindow implementation as you've said should be done.

As I said, it is all old code with the latest builds being applied to the project. Not suprprised now I was seeing issues.

Thanks again!
Tags
Window
Asked by
Lindsay Miles
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Lindsay Miles
Top achievements
Rank 1
Share this question
or