Browse Source

- Re-adjust styles.

- Move following attached properties to Popular category: [Grid.Row,RowSpan,Column,ColumnSpan], DockPanel.Dock,[Canvas.Left,Top,Bottom,Right]
- Arrange Tools in alphabetical order.
- Hide not-functioning menu items from the context menu in Property pad.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6349 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Kumar Devvrat 16 years ago
parent
commit
42b1ccfc25
  1. 36
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs
  2. 10
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/ControlStyles.xaml
  3. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GridAdorner.cs
  4. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/MarginHandle.cs
  5. 4
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/PropertyContextMenu.xaml

36
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs

@ -134,6 +134,16 @@ namespace ICSharpCode.WpfDesign.Designer
Metadata.AddPopularProperty(TreeViewItem.IsSelectedProperty); Metadata.AddPopularProperty(TreeViewItem.IsSelectedProperty);
Metadata.AddPopularProperty(Border.PaddingProperty); Metadata.AddPopularProperty(Border.PaddingProperty);
Metadata.AddPopularProperty(Shape.StretchProperty); Metadata.AddPopularProperty(Shape.StretchProperty);
Metadata.AddPopularProperty(Grid.RowProperty);
Metadata.AddPopularProperty(Grid.RowSpanProperty);
Metadata.AddPopularProperty(Grid.ColumnProperty);
Metadata.AddPopularProperty(Grid.ColumnSpanProperty);
Metadata.AddPopularProperty(DockPanel.DockProperty);
Metadata.AddPopularProperty(Canvas.LeftProperty);
Metadata.AddPopularProperty(Canvas.TopProperty);
Metadata.AddPopularProperty(Canvas.RightProperty);
Metadata.AddPopularProperty(Canvas.BottomProperty);
Metadata.AddPopularProperty(typeof(Binding), "Path"); Metadata.AddPopularProperty(typeof(Binding), "Path");
Metadata.AddPopularProperty(typeof(Binding), "Source"); Metadata.AddPopularProperty(typeof(Binding), "Source");
@ -204,34 +214,34 @@ namespace ICSharpCode.WpfDesign.Designer
//Metadata.DisablePlacement(typeof(Button)); //Metadata.DisablePlacement(typeof(Button));
Metadata.AddPopularControl(typeof(Button)); Metadata.AddPopularControl(typeof(Button));
Metadata.AddPopularControl(typeof(CheckBox));
Metadata.AddPopularControl(typeof(ComboBox));
Metadata.AddPopularControl(typeof(Label));
Metadata.AddPopularControl(typeof(TextBox));
Metadata.AddPopularControl(typeof(TextBlock));
Metadata.AddPopularControl(typeof(RadioButton));
Metadata.AddPopularControl(typeof(Canvas));
Metadata.AddPopularControl(typeof(Grid));
Metadata.AddPopularControl(typeof(Border)); Metadata.AddPopularControl(typeof(Border));
Metadata.AddPopularControl(typeof(Canvas));
Metadata.AddPopularControl(typeof(CheckBox));
Metadata.AddPopularControl(typeof(ComboBox));
Metadata.AddPopularControl(typeof(DataGrid));
Metadata.AddPopularControl(typeof(DockPanel)); Metadata.AddPopularControl(typeof(DockPanel));
Metadata.AddPopularControl(typeof(Expander)); Metadata.AddPopularControl(typeof(Expander));
Metadata.AddPopularControl(typeof(Grid));
Metadata.AddPopularControl(typeof(GroupBox)); Metadata.AddPopularControl(typeof(GroupBox));
Metadata.AddPopularControl(typeof(Image)); Metadata.AddPopularControl(typeof(Image));
Metadata.AddPopularControl(typeof(MediaElement)); Metadata.AddPopularControl(typeof(InkCanvas));
Metadata.AddPopularControl(typeof(InkCanvas)); Metadata.AddPopularControl(typeof(Label));
Metadata.AddPopularControl(typeof(DataGrid));
Metadata.AddPopularControl(typeof(ListBox)); Metadata.AddPopularControl(typeof(ListBox));
Metadata.AddPopularControl(typeof(ListView)); Metadata.AddPopularControl(typeof(ListView));
Metadata.AddPopularControl(typeof(MediaElement));
Metadata.AddPopularControl(typeof(Menu)); Metadata.AddPopularControl(typeof(Menu));
Metadata.AddPopularControl(typeof(PasswordBox)); Metadata.AddPopularControl(typeof(PasswordBox));
Metadata.AddPopularControl(typeof(ProgressBar)); Metadata.AddPopularControl(typeof(ProgressBar));
Metadata.AddPopularControl(typeof(RadioButton));
Metadata.AddPopularControl(typeof(RichTextBox)); Metadata.AddPopularControl(typeof(RichTextBox));
Metadata.AddPopularControl(typeof(ScrollViewer)); Metadata.AddPopularControl(typeof(ScrollViewer));
Metadata.AddPopularControl(typeof(Slider)); Metadata.AddPopularControl(typeof(Slider));
Metadata.AddPopularControl(typeof(StackPanel)); Metadata.AddPopularControl(typeof(StackPanel));
Metadata.AddPopularControl(typeof(TabControl)); Metadata.AddPopularControl(typeof(TabControl));
Metadata.AddPopularControl(typeof(TextBox));
Metadata.AddPopularControl(typeof(TextBlock));
Metadata.AddPopularControl(typeof(ToolBar)); Metadata.AddPopularControl(typeof(ToolBar));
Metadata.AddPopularControl(typeof(TreeView)); Metadata.AddPopularControl(typeof(TreeView));
Metadata.AddPopularControl(typeof(Viewbox)); Metadata.AddPopularControl(typeof(Viewbox));
Metadata.AddPopularControl(typeof(Viewport3D)); Metadata.AddPopularControl(typeof(Viewport3D));
Metadata.AddPopularControl(typeof(WrapPanel)); Metadata.AddPopularControl(typeof(WrapPanel));

10
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/ControlStyles.xaml

@ -144,8 +144,8 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- put a transparent rectangle in the rail so the user does not have to hit the small railHandle --> <!-- put a transparent rectangle in the rail so the user does not have to hit the small railHandle -->
<Rectangle Fill="Transparent" /> <Rectangle Fill="Transparent" />
<Path Name="railHandle" Fill="#FFE6E6FF" Stretch="Fill" Stroke="#FF584FFF" Data="M0,0 L0,1 1,0.5 z" /> <Path Name="railHandle" Fill="#FFE6E6FF" Stretch="Fill" Stroke="DodgerBlue" Data="M0,0 L0,1 1,0.5 z" />
<Path Name="line" Stretch="Fill" Stroke="#FF584FFF" Grid.Column="2" Margin="-1 0 0 0" Data="M0,0.5 L1,0.5" /> <Path Name="line" Stretch="Fill" Stroke="DodgerBlue" Grid.Column="2" Margin="-1 0 0 0" Data="M0,0.5 L1,0.5" />
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
@ -172,8 +172,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<!-- put a transparent rectangle in the rail so the user does not have to hit the small railHandle --> <!-- put a transparent rectangle in the rail so the user does not have to hit the small railHandle -->
<Rectangle Fill="Transparent" /> <Rectangle Fill="Transparent" />
<Path Name="railHandle" Fill="#FFE6E6FF" Stretch="Fill" Stroke="#FF584FFF" Data="M0,0 L1,0 0.5,1 z" /> <Path Name="railHandle" Fill="#FFE6E6FF" Stretch="Fill" Stroke="DodgerBlue" Data="M0,0 L1,0 0.5,1 z" />
<Path Name="line" Stretch="Fill" Stroke="#FF584FFF" Grid.Row="2" Margin="0 -1 0 0" Data="M0.5,0 L0.5,1" /> <Path Name="line" Stretch="Fill" Stroke="DodgerBlue" Grid.Row="2" Margin="0 -1 0 0" Data="M0.5,0 L0.5,1" />
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True"> <Trigger Property="IsMouseOver" Value="True">
@ -205,6 +205,7 @@
<ColumnDefinition MaxWidth="20" MinWidth="10" /> <ColumnDefinition MaxWidth="20" MinWidth="10" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="8" /> <ColumnDefinition Width="8" />
<ColumnDefinition Width="1.5"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Rectangle Fill="Transparent" Height="10" Grid.Column="0" Grid.ColumnSpan="4" /> <Rectangle Fill="Transparent" Height="10" Grid.Column="0" Grid.ColumnSpan="4" />
<Path Name="line1" Stretch="Fill" Stroke="{StaticResource HandleBrush}" StrokeThickness="1.5" Margin="0 0 0 0" Data="M0,-0.75 L1,-0.75" Grid.Column="0" /> <Path Name="line1" Stretch="Fill" Stroke="{StaticResource HandleBrush}" StrokeThickness="1.5" Margin="0 0 0 0" Data="M0,-0.75 L1,-0.75" Grid.Column="0" />
@ -216,6 +217,7 @@
</TextBlock> </TextBlock>
<Path Name="line2" Stretch="Fill" Stroke="{StaticResource HandleBrush}" StrokeThickness="1.5" Margin="0 0 0 0" Data="M0,-0.75 L1,-0.75" Grid.Column="2" /> <Path Name="line2" Stretch="Fill" Stroke="{StaticResource HandleBrush}" StrokeThickness="1.5" Margin="0 0 0 0" Data="M0,-0.75 L1,-0.75" Grid.Column="2" />
<Path Name="arrow2" Margin="0,1,0,1" Fill="{StaticResource HandleBrush}" Stretch="Fill" Stroke="{TemplateBinding Panel.Background}" StrokeThickness="0.5" Data="M0,0 L0,1 1,0.5 z" Grid.Column="3" /> <Path Name="arrow2" Margin="0,1,0,1" Fill="{StaticResource HandleBrush}" Stretch="Fill" Stroke="{TemplateBinding Panel.Background}" StrokeThickness="0.5" Data="M0,0 L0,1 1,0.5 z" Grid.Column="3" />
<Rectangle Width="1.5" Fill="{StaticResource HandleBrush}" Grid.Column="4"/>
</Grid> </Grid>
<!-- Rotate the handle and angle of rotation being set by the Margin type. See enum HandleOrientation --> <!-- Rotate the handle and angle of rotation being set by the Margin type. See enum HandleOrientation -->
<Grid.LayoutTransform> <Grid.LayoutTransform>

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/GridAdorner.cs

@ -25,7 +25,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
{ {
static GridRailAdorner() static GridRailAdorner()
{ {
bgBrush = new SolidColorBrush(Color.FromArgb(0x30, 0x20, 0x20, 0xff)); bgBrush = new SolidColorBrush(Color.FromArgb(0x35, 0x1E, 0x90, 0xff));
bgBrush.Freeze(); bgBrush.Freeze();
//selBrush = new SolidColorBrush(Color.FromArgb(0xC0, 0xff, 0xb7, 0x4f)); //selBrush = new SolidColorBrush(Color.FromArgb(0xC0, 0xff, 0xb7, 0x4f));

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/MarginHandle.cs

@ -189,7 +189,7 @@ namespace ICSharpCode.WpfDesign.Designer.Controls
this.Visibility = handleLength != 0.0 ? Visibility.Visible : Visibility.Hidden; this.Visibility = handleLength != 0.0 ? Visibility.Visible : Visibility.Hidden;
if (this.lineArrow != null) if (this.lineArrow != null)
{ {
lineArrow.Visibility = handleLength < 23 ? Visibility.Hidden : Visibility.Visible; lineArrow.Visibility = handleLength < 25 ? Visibility.Hidden : Visibility.Visible;
} }
Stub.Visibility = this.Visibility == Visibility.Visible ? Visibility.Hidden : Visibility.Visible; Stub.Visibility = this.Visibility == Visibility.Visible ? Visibility.Hidden : Visibility.Visible;
} }

4
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/PropertyContextMenu.xaml

@ -6,7 +6,7 @@
<MenuItem Header="Reset" <MenuItem Header="Reset"
Click="Click_Reset" /> Click="Click_Reset" />
<MenuItem Header="Binding" <MenuItem Header="Binding"
Click="Click_Binding" /> Click="Click_Binding" /><!--
<MenuItem Header="TODO:" <MenuItem Header="TODO:"
IsEnabled="False" /> IsEnabled="False" />
<MenuItem x:Name="uxStaticResource" <MenuItem x:Name="uxStaticResource"
@ -20,6 +20,6 @@
<MenuItem Header="Convert To Local Value" <MenuItem Header="Convert To Local Value"
Click="Click_ConvertToLocalValue"/> Click="Click_ConvertToLocalValue"/>
<MenuItem Header="Save As Resource..." <MenuItem Header="Save As Resource..."
Click="Click_SaveAsResource"/> Click="Click_SaveAsResource"/>-->
</ContextMenu> </ContextMenu>

Loading…
Cancel
Save