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

MouseLeftButtonDown-Event don't works

1 Answer 90 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Nicole
Top achievements
Rank 1
Nicole asked on 28 Jan 2011, 01:21 PM
Hello friends,

I am trying to implement the MouseLeftButtonDown-Event for some PanelBarItems. But the Event isn't fired. Could you please help me to find out why it isn't?

<telerik:RadPanelBar ExpandMode="Multiple" VerticalAlignment="Stretch" Name="pbarMain">
    <!-- Kapazitäten -->
    <telerik:RadPanelBarItem VerticalAlignment="Stretch" IsExpanded="True">
        <telerik:RadPanelBarItem.Header>
            <StackPanel Orientation="Horizontal" Margin="5 4 5 5">
                <Image Source="Images/kapazität.ico"
                       Style="{StaticResource style_image_20x20}"/>
                <Label Content="Kapazitäten" FontWeight="Bold"/>
            </StackPanel>
        </telerik:RadPanelBarItem.Header>
     
        <telerik:RadPanelBarItem MouseLeftButtonDown="RadPanelBarItem_MouseDown"
                                 Tag="KapaViewPage.xaml">
            <telerik:RadPanelBarItem.Header>
                <StackPanel Orientation="Horizontal" Margin="10 4 5 5">
                    <Image Source="Images/Document_search.ico"
                           Style="{StaticResource style_image_16x16}"/>
                    <Label Content="Anzeigen/Bearbeiten"/>
                </StackPanel>
            </telerik:RadPanelBarItem.Header>
        </telerik:RadPanelBarItem>


private void RadPanelBarItem_MouseDown(object sender, MouseButtonEventArgs e)
{
    if (sender != null)
    {
        RadPanelBarItem item = sender as RadPanelBarItem;
        if (item.Tag != null)
        {
            string ziel = item.Tag.ToString();
 
            if (ziel.Length > 0) mvm.Navigate(ziel);
        }
    }
}



1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 02 Feb 2011, 04:15 PM
Hi Josef,

This event is handled by other events of the RadPanelItem. You can wire it by the UIElement.AddHandler method like it is  done in the attached sample. You can also use the new RadPanelBar events:RadPanelBar.ItemClick and RadPanelItem.Click. Feel free to ask if you need further assistance.

Greetings,
Petar Mladenov
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
PanelBar
Asked by
Nicole
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or