You already have a Method GetColor() which updates StackPanel Background. To Bind the TextBlocks with Value of Slider, I used Behaviours. Private void slider3_ValueChanged(object sender, RoutedPropert圜hangedEventArgs e) / This event is called whenever value of the slider3 control is changed. Private void slider2_ValueChanged(object sender, RoutedPropert圜hangedEventArgs e) / This event is called whenever the value of slider2 control is changed. Private void slider1_ValueChanged(object sender, RoutedPropert圜hangedEventArgs e) / This event is called whenever the value of slider1 control is changed. Private void Window_Loaded(object sender, RoutedEventArgs e) / And change the background of panel control. / This event is called when the window is first time loaded in memory StackPanel1.Background = colorBrush //Setting background of stack panel. Animated Counting Numbers in After Effects Slider Control Motion Master 21K subscribers Subscribe 244K views 7 years ago Here's a little tutorial of how you can create animated numbers. SolidColorBrush colorBrush = new SolidColorBrush(cc) //Creating object of SolidColorBruch class. / slider one, two, three and then change the background colorīyte rr = (byte)slider1.Value //Retriving values from slider1īyte gg = (byte)slider2.Value //Retriving values from slider2īyte bb = (byte)slider3.Value //Retriving values from slider3Ĭolor cc = Color.FromRgb(rr, gg, bb) //Create object of Color class. / This method is used to create color by taking values from SolidColorBrush colorBrush = (SolidColorBrush)stackPanel1.Background Private void button1_Click(object sender, RoutedEventArgs e) / which sets with the help of slider control and display it in message box. / On the click event of the GetColor() button we het the color code Can someone please assist me? I have look long and hard for a method but nothing seems to work. I need to be able to change the background color of a canvas based on the sliders value.
0 Comments
Leave a Reply. |