Bug: WebFishEyeButton.SetText doesn't work.

1 reply. Last post: July 9, 2010 4:25 AM by Glenn Layaar
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Rick KennedyMember

I would like to update the image and text of a primary button based upon the click of a child StackButton. While SetImageSource works, SetText does not. 


        private void Demo_StackButtonClick(object sender, WebFishEyeButtonEventArgs e)
{
WebFishEyeStackButton button = (WebFishEyeStackButton)e.Button;
DemoUpdateParentButtonWithDelay(button.Parent, button);
}

static void DemoUpdateParentButtonWithDelay(WebFishEyeButton button, WebFishEyeStackButton stackButton)
{

Storyboard story = new Storyboard() { BeginTime = TimeSpan.FromSeconds(.01) };
story.Completed += (s, args) => DemoUpdateParentButton(button, stackButton);
story.Begin();
}

static void DemoUpdateParentButton(WebFishEyeButton button, WebFishEyeStackButton stackButton)
{
BitmapImage bmp = (BitmapImage)stackButton.ImageSource;
button.SetImageSource(bmp.UriSource.OriginalString);
button.SetText(stackButton.Text);
}


All times are GMT -5. The time now is 6:39 AM.
Previous Next