Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
Capture Click event of controls inside XamOutlookBar
posted

Hi,

I want to capture the events of controls placed inside the Outlookbar, which I cannot with the following code.

Please correct me if there is something going wrong in my code.

 

Thanks

Irfan

 

 

Xaml:


    <Grid x:Name="LayoutRoot" Background="White">
        <StackPanel Orientation="Horizontal" x:Name="StackPnl1">
        <ig:XamOutlookBar HorizontalAlignment="Left" Height="400" Margin="10,10,0,0" Name="XamOutlookBar1" VerticalAlignment="Top" Width="200">
            <ig:OutlookBarGroup Header="Sales" HorizontalAlignment="Stretch" Margin="0" Name="OutlookBarGroup1" VerticalAlignment="Stretch" >
                <ContentControl>
                        <StackPanel>
                            <Button Content="Button" Height="23" Name="Button1" Width="75" />
                            <HyperlinkButton Content="HyperlinkButton" Height="35" Name="HyperlinkButton1" Width="100" />
                        </StackPanel>
                </ContentControl>
            </ig:OutlookBarGroup>
            <ig:OutlookBarGroup Header="Stock" HorizontalAlignment="Stretch" Margin="0" Name="OutlookBarGroup2" VerticalAlignment="Stretch" >
                <ContentControl>
                   
                </ContentControl>
            </ig:OutlookBarGroup>
        </ig:XamOutlookBar>
            <sdk:Label Height="28" Name="Label1" Width="120" />
           
        </StackPanel>
    </Grid>

 

Xaml.vb:


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
        Label1.Content = "Clicked"
    End Sub

    Private Sub HyperlinkButton1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles HyperlinkButton1.Click
        Label1.Content = "Clicked"
    End Sub

Parents
  • 14517
    Offline posted

    Hello,

    Please add the click event to the XAML as follows:

    <StackPanel Orientation="Horizontal" x:Name="StackPnl1">
                <ig:XamOutlookBar HorizontalAlignment="Left" Height="400"
       Margin="10,10,0,0" Name="XamOutlookBar1" VerticalAlignment="Top" Width="200">
                    <ig:OutlookBarGroup Header="Sales" HorizontalAlignment="Stretch"
        Margin="0" Name="OutlookBarGroup1" VerticalAlignment="Stretch" >
                        <ContentControl>
                            <StackPanel>
                                <Button Content="Button" Height="23" Name="Button1"
           Width="75" Click="Button1_Click" />
                                <HyperlinkButton Content="HyperlinkButton" Height="35"
           Name="HyperlinkButton1" Width="100" Click="HyperlinkButton1_Click" />
                            </StackPanel>
                        </ContentControl>
                    </ig:OutlookBarGroup>
                    <ig:OutlookBarGroup Header="Stock" HorizontalAlignment="Stretch" Margin="0"
        Name="OutlookBarGroup2" VerticalAlignment="Stretch" >
                        <ContentControl>
                        </ContentControl>
                    </ig:OutlookBarGroup>
                </ig:XamOutlookBar>
              
                <sdk:Label Height="28" Name="Label1" Width="120" />

            </StackPanel>

      
    Let me know if you have any questions.

    Valerie 

Reply Children