XAML call TabItem Unload event programmatically -


i'm quite new xaml i'm hoping simple question.

my main window has tabcontrol , on cases, call unload event on tab.

the mainview xaml looks this:

<window         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:views="clr-namespace:namespace.project1.views"  x:class="namespace.project1.views.mainwindow"                     width="500" height="500"         title="hello world">      <grid>         <tabcontrol x:name="mytabs" horizontalalignment="stretch" verticalalignment="stretch" >             <tabitem header="live" name="childview">                 <views:childview horizontalalignment="stretch" verticalalignment="stretch" />             </tabitem>             <tabitem header="playback" name="otherview">                 <views:otherview horizontalalignment="stretch" verticalalignment="stretch" />             </tabitem>         </tabcontrol>     </grid> </window> 

question: on close of application, i'm getting onexit event on app.xaml.cs code, , there wanted make sure childview tab calls unload event.

i tried programmatically call mytabs.selecteditem or mytabs.selectedindex or othertab.isvisible = true none fire unload event of childview.

if click on otherview tab, event fires.

how call programmatically?? appreciated.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -