Esempio n. 1
0
 private void toolsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     additionalSettingsGrid.DataContext = SelectedTool;
     lineWidthRow.Height   = new GridLength(40);
     strokeColorRow.Height = new GridLength(40);
     fillColorRow.Height   = new GridLength(40);
     if (SelectedTool is BrushTool || SelectedTool is LineTool)
     {
         fillColorRow.Height = new GridLength(0);
     }
     else if (SelectedTool is EllipseTool)
     {
         roundedCornersRow.Height = new GridLength(0);
     }
     else if (SelectedTool is PaintBucketTool)
     {
         lineWidthRow.Height   = new GridLength(0);
         strokeColorRow.Height = new GridLength(0);
     }
     else if (!SelectedTool.RequiresAdditionalSettings())
     {
         lineWidthRow.Height   = new GridLength(0);
         strokeColorRow.Height = new GridLength(0);
         fillColorRow.Height   = new GridLength(0);
     }
 }