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

radwindow in prism

9 Answers 190 Views
Window
This is a migrated thread and some comments may be shown as answers.
scorp
Top achievements
Rank 1
scorp asked on 15 Dec 2010, 04:20 PM
I have a radwindow control in one of my modules. This module needs to popup a radwindow with a grid inside it on an event subscription from other modules. How can I go about this.
Thanks.

9 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 20 Dec 2010, 02:01 PM
Hello,

Attached you can find the sample. I hope this helps.
 

All the best,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
scorp
Top achievements
Rank 1
answered on 20 Dec 2010, 10:20 PM
This is a great example. Thanks a lot.
While implementing in my project I am trying to open the pop up on a chart's ItemClick event.

in XAML: I have

<chart:ChartArea ItemClick="{Binding showPopupCommand}"> 

In the viewModel I have the following lines of code:

 

private readonly ICommand showPopupCommand;

this.showPopupCommand = new DelegateCommand(this.ShowPopupView);



private void ShowPopupView()

{
	//Need to show a popup 
	string test = "test"; //entered this for test to see if I can get to here.

}

 

I am getting an Exception on InitializeComponent()

Failed to assign to property 'Telerik.Windows.Controls.Charting.ChartArea.ItemClick'. 

I am not sure if I am missing any pieces.




0
Giuseppe
Telerik team
answered on 23 Dec 2010, 04:40 PM
Hello scorp,

ChartArea.ItemClick is an event and not a command -- you can hook up an event handler to it, but you cannot bind a command.

Generally the current version of RadChart does not provide support for ItemClick commanding but we will be introducing ChartArea.Command / CommandParameter properties for the official Q3 2010 SP1 release (around mid-January) and then you will be able to achieve the desired functionality.

You can also preview the commanding functionality by downloading the weekly internal build from your Client.Net account right now.


Best wishes,
Freddie
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
scorp
Top achievements
Rank 1
answered on 27 Dec 2010, 03:17 PM
Thanks for the reply. 
I have a couple of questions from the example project provided:
1) How do I pass on the event parameters from the shell public void ShowRadWindow(string commandName)
 which we subscribed to to WindowContentViewModel.cs to display appropriate content.

2) I am having one small issue where I open the radwindow and fill in a gridview inside it with some data. After the grid loads up the radwindow resizes and is not in the center of the screen even though in the shell I have the below code:

MyRadWindow obj = new MyRadWindow();
                obj.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
                obj.ShowDialog();

How can I center the radwindow.
Thanks.
0
George
Telerik team
answered on 03 Jan 2011, 04:39 PM
Hello,

Straight to your questions:



Best wishes,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
scorp
Top achievements
Rank 1
answered on 04 Jan 2011, 05:18 PM
Please take a look at the project. 
https://www.sendthisfile.com/vyUJwtSlg6sagO7d7zs8DJhk

I need to center the radwindow after the grid loads up. I am not sure how to achieve this.
0
George
Telerik team
answered on 07 Jan 2011, 10:31 AM
Hi,

 
You don't need to pass the WindowContentViewModel as parameter from other project. You could set the ViewModel like:

public WindowContentView()
        {
            InitializeComponent();
            this.DataContext = new WindowContentView();
        }


 Anyway, I have an example how to pass parameters using prism events. Attached you can find the sample. I hope this helps.


Kind regards,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
scorp
Top achievements
Rank 1
answered on 07 Jan 2011, 02:47 PM
Hey George, Thanks for taking a look.
However your example does not address the issue of centering the RadWindow when you have a grid inside of it.
Please refer to the example project I have uploaded at https://www.sendthisfile.com/vyUJwtSlg6sagO7d7zs8DJhk
where the Radwindow does not center itself.
Thanks.
0
Miroslav Nedyalkov
Telerik team
answered on 11 Jan 2011, 01:40 PM
Hello Scorp,

 To share a file with us you might open a support ticket and attach the file.

About the problem you are experiencing - the window might not be centered, because its real size is found out after it is centered. Because of this the window was centered according to smaller size and after the size is changed it doesn't center again (this is by design). What you could do is to either make sure its correct size is determined on the first measure pass or to center the window manually once the final size is determined.

Greetings,

Miroslav Nedyalkov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Window
Asked by
scorp
Top achievements
Rank 1
Answers by
George
Telerik team
scorp
Top achievements
Rank 1
Giuseppe
Telerik team
Miroslav Nedyalkov
Telerik team
Share this question
or