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

Telerik Popup crashes on Silverlight

2 Answers 29 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gustavo
Top achievements
Rank 1
Gustavo asked on 17 Sep 2015, 07:39 PM

Hi there!

I'm trying to shows a telerik popup from a button but I get an NullReferenceException because I don't know how implement it. Please give me a hand. This is my code:

                                    <telerik:RadButton Command="{Binding Path=DataContext.LockInfoCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadGridView}}"  
                                                       CommandParameter="{Binding}">
                                        <telerik:RadButton.Content>
                                            <StackPanel>
                                            <Image Source="/SLIcebar;component/Assets/Images/lock.png" Width="10" Height="10"
                                               Visibility="{Binding Path=IsLocked, Converter={StaticResource VisibleIfTrue}}" 
                                               ToolTipService.ToolTip="{Binding Path=LockInfo}"/>
                                            </StackPanel>
                                        </telerik:RadButton.Content>
                                        
                                    </telerik:RadButton>
                                    <telerik:Popup IsOpen="{Binding Path=DataContext.OpenPopup, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType=telerik:RadGridView}}"
                                                   CloseOnOutsideClick="True" >
                                        <telerik:Popup.Content>
                                           <telerik:RadWindow>
                                               <Grid>
                                                   <TextBlock Text="TEST"></TextBlock>
                                               </Grid>
                                           </telerik:RadWindow>
                                        </telerik:Popup.Content>
                                    </telerik:Popup>

 

Thanks a ton in advance

2 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 18 Sep 2015, 10:32 AM
Hi Gustavo,

Note the Silverlight Popup implementation is intended for internal use only. What I can suggest you for achieving such scenarios would be to use our DropDownButton. Or if you need to show RadWindow on button click - you should be doing that in the code behind - it is not good practice to define RadWindow in XAML (for more details about the usage check this article).

Hope this helps.

Regards,
Kalin
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Gustavo
Top achievements
Rank 1
answered on 18 Sep 2015, 11:34 AM

Hi Kalin,

First of all, thanks for your reply and help. I'm trying to show a popup with some info, I was guessing that this control can help me with this. It has two properties that's look pretty cool, like CloseOnOutsideClick and Placement. I hope I could use it.

Tags
General Discussions
Asked by
Gustavo
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Gustavo
Top achievements
Rank 1
Share this question
or