Button in Header from code

2 posts, 0 answers
  1. Gary Blakely
    Gary Blakely avatar
    63 posts
    Member since:
    Jan 2010

    Posted 17 Oct 2010 Link to this post

    I'm trying to put a button in a radwindow that I create on the fly from code.  But it's not working.  the button is "born dead".  When I click on it I don't even see the visual effect of the click.  Nor does it execute the click event.  My code is as follows.  What is wrong?
    Thanks, Gary

               Image BigImage = new Image();
               bmp.SetSource(new System.IO.MemoryStream(myPictureAndNotesClass.Picture));
               BigImage.Source = bmp;
               ToolTipService.SetToolTip(BigImage, myPictureAndNotesClass.Notes);
               RadWindow BigPicWindow = new RadWindow();
               StackPanel mysp = new StackPanel();
               mysp.Orientation = Orientation.Horizontal;
               Button fsbutton = new Button();
               fsbutton.Click += new RoutedEventHandler(fsbutton_Click);
               fsbutton.Content = "Full Screen";
               TextBlock textblock = new TextBlock() { Text = "     " +  myPictureAndNotesClass.Notes };
               BigPicWindow.Header = mysp;
               BigPicWindow.Content = BigImage;
  2. Konstantina
    Konstantina avatar
    2332 posts

    Posted 18 Oct 2010 Link to this post

    Hello Gary,

    Thank you for contacting us.

    To make it work you will have to set the IsHeaderHitTestVisible property of the RadWindow to True. In that way the Button in the Header will become clickable.

    Hope this information is helpful. Please let us know if you have any other questions.

    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top