Example #1
0
 public override void OnApplyTemplate()
 {
     canvas    = (DrawCanvas)GetTemplateChild("PART_DrawCanvas");
     primary   = (OptionButton)GetTemplateChild("PART_PrimaryButton");
     secondary = (OptionButton)GetTemplateChild("PART_SecondaryButton");
     accent1   = (OptionButton)GetTemplateChild("PART_Accent1Button");
     accent2   = (OptionButton)GetTemplateChild("PART_Accent2Button");
     accent3   = (OptionButton)GetTemplateChild("PART_Accent3Button");
 }
Example #2
0
        void Option_Click(object sender, RoutedEventArgs e)
        {
            OptionButton opt = sender as OptionButton;

            if (canvas != null)
            {
                SolidColorBrush brush = (SolidColorBrush)opt.Background;
                BrushColor = brush.Color;
            }
        }