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

How to add a event trigger for "PreviewClose" event in a Popup.

1 Answer 89 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Sonia
Top achievements
Rank 1
Sonia asked on 07 Dec 2010, 07:23 PM
Hi!

I have created a popup and from within the popup I have created a telerik docking window.  This works fine.  But the problem is if the user closes the telerik window by clicking on the "X" then the popup never comes back again.  This is because the popup's dependency property IsOpen is left set to true.  I want to set up a trigger event so I can hijack the telerik close event so I can first set this property IsOpen to false and then let Telerik to continue the close.  Can you please let me know how I can do this?  If possible I want to do this from within the XAML file.  I figured we can use an event trigger for PreviewClose event and when this event fires then I can set the popup.IsOpen to false.  Any help is greatly appreciated.

Thanks,

Sonia


Code for Popup:

<

 

 

Popup x:Name="FiberPopUp" Placement="Mouse" IsEnabled="True" IsOpen="False" Focusable="True">

 

 

 

 

<Popup.RenderTransform>

 

 

 

 

<ScaleTransform>

 

 

 

 

<ScaleTransform.ScaleX>

 

 

 

 

<MultiBinding Converter="{x:Static coreconverters:ArithmeticConverter.Default}" ConverterParameter="/">

 

 

 

 

<Binding Source="1.0" Mode="OneWay" />

 

 

 

 

<Binding Path="ContentScale" Source="{x:Static local:ViewModel.Instance}" Mode="OneWay"/>

 

 

 

 

</MultiBinding>

 

 

 

 

</ScaleTransform.ScaleX>

 

 

 

 

<ScaleTransform.ScaleY>

 

 

 

 

<MultiBinding Converter="{x:Static coreconverters:ArithmeticConverter.Default}" ConverterParameter="/">

 

 

 

 

<Binding Source="1.0" Mode="OneWay" />

 

 

 

 

<Binding Path="ContentScale" Source="{x:Static local:ViewModel.Instance}" Mode="OneWay"/>

 

 

 

 

</MultiBinding>

 

 

 

 

</ScaleTransform.ScaleY>

 

 

 

 

</ScaleTransform>

 

 

 

 

</Popup.RenderTransform>

 

 

 

 

<StackPanel Width="auto" Height="auto" >

 

 

 

 

<telerikDocking:RadPaneGroup>

 

 

 

 

<telerikDocking:RadPane Header="Fiber PopUp." ContextMenuTemplate="{x:Null}">

 

 

 

 

<TextBlock Text="This is a test " />

 

 

 

 

</telerikDocking:RadPane>

 

 

 

 

</telerikDocking:RadPaneGroup>

 

 

 

 

</StackPanel>

 

 

 

 

</Popup>


 

1 Answer, 1 is accepted

Sort by
0
George
Telerik team
answered on 10 Dec 2010, 10:45 AM
Hi Sonia,

Placing a RadPaneGroup outside of a RadSplitContainer is not supported scenario. Each RadPane must be placed in a RadPaneGroup, each RadPaneGroup must be placed in a RadSplitContainer, and each RadSplitContainer must be placed in another RadSplitContainer or a RadDocking control. For more information, please refer to our online documentation - http://www.telerik.com/help/wpf/raddocking-getting-started2.html

RadDocking control has Close event that is fired when a RadPane is closed. You could use this event as well.

I hope this helps.

Regards,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
Docking
Asked by
Sonia
Top achievements
Rank 1
Answers by
George
Telerik team
Share this question
or