Commit 78df386d authored by 潘栩锋's avatar 潘栩锋 🚴

1.修改 DynamicResource 都改为 StaticResource

parent 08b3774a
......@@ -165,7 +165,7 @@
<TabItem Header="△△"/>
<TabItem Header="△△"/>
</TabControl>
<Button Grid.Row="1" Style="{DynamicResource ButtonStyle_clickMe}" Click="btnGageClick" >
<Button Grid.Row="1" Style="{StaticResource ButtonStyle_clickMe}" Click="btnGageClick" >
<TextBlock Text="点击我" />
</Button>
......
......@@ -37,7 +37,7 @@
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Stroke="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
......@@ -98,7 +98,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
......@@ -118,7 +118,7 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......
......@@ -34,7 +34,7 @@
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Stroke="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
......@@ -113,7 +113,7 @@
<Setter Property="Padding" Value="2"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
......
......@@ -121,7 +121,7 @@
<TabItem Header="□□□" Style="{StaticResource TabItemStyle1}"/>
<TabItem Header="□□□" Style="{StaticResource TabItemStyle1}"/>
</TabControl>
<Button Style="{DynamicResource ButtonStyle_clickMe}" Click="btnMenuClick" >
<Button Style="{StaticResource ButtonStyle_clickMe}" Click="btnMenuClick" >
<TextBlock Text="点击我" FontSize="25" RenderTransformOrigin="0.5,0.4" Margin="-20">
<TextBlock.RenderTransform>
......@@ -135,10 +135,10 @@
</TextBlock>
</Button>
<Button Grid.Column="1" Style="{DynamicResource ButtonStyle_clickMe}" Click="btnDynareaClick" >
<Button Grid.Column="1" Style="{StaticResource ButtonStyle_clickMe}" Click="btnDynareaClick" >
<TextBlock Text="点击我" />
</Button>
<Button Grid.Column="2" Style="{DynamicResource ButtonStyle_clickMe}" Click="btnGraphClick">
<Button Grid.Column="2" Style="{StaticResource ButtonStyle_clickMe}" Click="btnGraphClick">
<TextBlock Text="点击我" />
</Button>
</Grid>
......
......@@ -20,7 +20,7 @@
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Stroke="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
......@@ -81,7 +81,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
......@@ -101,7 +101,7 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......@@ -115,7 +115,7 @@
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
......
......@@ -21,7 +21,7 @@
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Stroke="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
......@@ -106,7 +106,7 @@
<Setter Property="Padding" Value="2"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
......
......@@ -38,7 +38,7 @@
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Stroke="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
......@@ -99,7 +99,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
......@@ -119,7 +119,7 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
......
......@@ -20,7 +20,7 @@
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True"
Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
Stroke="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"
StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
......@@ -81,7 +81,7 @@
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
......@@ -101,7 +101,7 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
......
......@@ -99,7 +99,7 @@
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
<Rectangle Margin="2" SnapsToDevicePixels="True" Stroke="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
</ControlTemplate>
</Setter.Value>
</Setter>
......
......@@ -24,7 +24,7 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
<Trigger Property="IsFocused" Value="true">
<Setter TargetName="PART_Border" Property="BorderThickness" Value="1"/>
......
......@@ -25,7 +25,7 @@
</Grid>
</ControlTemplate>
<Style x:Key="WindowBigCloseStyle" TargetType="{x:Type Window}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="Foreground" Value="{StaticResource {x:Static SystemColors.WindowTextBrushKey}}"/>
<Setter Property="Background" Value="{x:Null}"/>
<Setter Property="ResizeMode" Value="NoResize"/>
<Setter Property="WindowStyle" Value="None"/>
......
......@@ -601,7 +601,7 @@
<Version>4.1.0</Version>
</PackageReference>
<PackageReference Include="EPPlus">
<Version>5.4.2</Version>
<Version>4.5.3.2</Version>
</PackageReference>
<PackageReference Include="MahApps.Metro">
<Version>2.4.1</Version>
......
......@@ -85,7 +85,7 @@
</StackPanel>
<StackPanel Orientation="Horizontal">
<!--<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="{DynamicResource strSampleInterval}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="{StaticResource strSampleInterval}" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding Interval}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="min"/>
......
......@@ -68,7 +68,7 @@
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Button Content="运行至" Style="{DynamicResource AccentedSquareButtonStyle2}" Command="{Binding RunToCmd}"
<Button Content="运行至" Style="{StaticResource AccentedSquareButtonStyle2}" Command="{Binding RunToCmd}"
/>
<TextBlock Text="{Binding Msg}" Style="{StaticResource TextBlockStyle_FieldContent_mm}"/>
</StackPanel>
......@@ -217,7 +217,7 @@
</StackPanel>
</StackPanel>
</StackPanel>
<Button Content="测量" Style="{DynamicResource AccentedSquareButtonStyle2}" Command="{Binding MeasureCmd}"/>
<Button Content="测量" Style="{StaticResource AccentedSquareButtonStyle2}" Command="{Binding MeasureCmd}"/>
......
......@@ -23,17 +23,17 @@
<SolidColorBrush x:Key="WhiteBrush" Color="White"/>
<Style x:Key="TitleStyle" TargetType="TextBlock">
<Setter Property="Width" Value="50"/>
<Setter Property="Foreground" Value="{DynamicResource GrayBrush1}"/>
<Setter Property="Foreground" Value="{StaticResource GrayBrush1}"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="TextAlignment" Value="Right"/>
</Style>
<Style x:Key="ValueStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource TextBrush}"/>
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Padding" Value="5,0"/>
</Style>
<Style x:Key="UnitStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource GrayBrush2}"/>
<Setter Property="Foreground" Value="{StaticResource GrayBrush2}"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
</Style>
......@@ -207,14 +207,14 @@
<Viewbox >
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TitleStyle}"
Foreground="{DynamicResource WhiteBrush}"
Background="{DynamicResource TextBrush}"
Foreground="{StaticResource WhiteBrush}"
Background="{StaticResource TextBrush}"
Opacity="0.8"
Text="平均: "
/>
<TextBlock Style="{StaticResource ValueStyle}"
Foreground="{DynamicResource WhiteBrush}"
Background="{DynamicResource TextBrush}"
Foreground="{StaticResource WhiteBrush}"
Background="{StaticResource TextBrush}"
Text="{Binding Average,StringFormat={}{0:F1}}"
/>
</StackPanel>
......@@ -223,13 +223,13 @@
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource TitleStyle}"
Foreground="Black"
Background="{DynamicResource WhiteBrush}"
Background="{StaticResource WhiteBrush}"
Opacity="0.8"
Text="3σ: "
/>
<TextBlock Style="{StaticResource ValueStyle}"
Foreground="{DynamicResource TextBrush}"
Background="{DynamicResource WhiteBrush}"
Foreground="{StaticResource TextBrush}"
Background="{StaticResource WhiteBrush}"
Text="{Binding Sigma3,StringFormat={}{0:F1}}"
/>
</StackPanel>
......
......@@ -65,7 +65,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="PropertyChanged.Fody">
<Version>3.2.5</Version>
<Version>3.3.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
......
......@@ -11,6 +11,16 @@
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="EventInvokerNames" type="xs:string">
<xs:annotation>
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
......@@ -31,6 +41,16 @@
<xs:documentation>Used to control if equality checks should use the static Equals method resolved from the base class.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressWarnings" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings from this weaver.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="SuppressOnPropertyNameChangedWarning" type="xs:boolean">
<xs:annotation>
<xs:documentation>Used to turn off build warnings about mismatched On_PropertyName_Changed methods.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment