淘宝拍单
This commit is contained in:
1 parent
37cb8e86ae
commit
c993e00f15
4 files changed
+283
-89
No files matched your search
@@ -1,21 +1,37 @@
|
||||
<UserControl x:Class="_29WxOrderWpf.UserControls.UcWaterMarkTextBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="28" d:DesignWidth="100">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<local:WaterMarkVisibilityConverter x:Key="WaterMarkVisibility"/>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<TextBox x:Name="txt" Text="{Binding Text, Mode=TwoWay}" Style="{StaticResource BaseRoundCornerTextBoxStyle}" BorderBrush="{StaticResource pageColorBrush}"
|
||||
BorderThickness="{Binding TextBorderThickness}"
|
||||
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Center" TextWrapping="{Binding TextWrapping}" TextChanged="txt_TextChanged"/>
|
||||
<TextBlock x:Name="tbWaterMark" Text="{Binding WaterMark}" Margin="4,0,4,0" VerticalAlignment="Center" IsHitTestVisible="False" Foreground="DarkGray"
|
||||
Visibility="{Binding ElementName=txt,Path=Text,Converter={StaticResource WaterMarkVisibility}}"></TextBlock>
|
||||
</Grid>
|
||||
<UserControl
|
||||
x:Class="_29WxOrderWpf.UserControls.UcWaterMarkTextBox"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
d:DesignHeight="28"
|
||||
d:DesignWidth="100"
|
||||
mc:Ignorable="d">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<local:WaterMarkVisibilityConverter x:Key="WaterMarkVisibility" />
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<TextBox
|
||||
x:Name="txt"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
VerticalContentAlignment="Center"
|
||||
BorderBrush="{StaticResource pageColorBrush}"
|
||||
BorderThickness="{Binding TextBorderThickness}"
|
||||
Style="{StaticResource BaseRoundCornerTextBoxStyle}"
|
||||
Text="{Binding Text, Mode=TwoWay}"
|
||||
TextChanged="txt_TextChanged"
|
||||
TextWrapping="{Binding TextWrapping}" />
|
||||
<TextBlock
|
||||
x:Name="tbWaterMark"
|
||||
Margin="4,0,4,0"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="DarkGray"
|
||||
IsHitTestVisible="False"
|
||||
Text="{Binding WaterMark}"
|
||||
Visibility="{Binding ElementName=txt, Path=Text, Converter={StaticResource WaterMarkVisibility}}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -1,55 +1,99 @@
|
||||
<UserControl x:Class="_29WxOrderWpf.UserControls.UcWindowBoxes"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
mc:Ignorable="d" Width="Auto" Height="Auto"
|
||||
d:DesignHeight="30" d:DesignWidth="60" Background="Transparent" Loaded="WindowBoxes_Loaded">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<UserControl
|
||||
x:Class="_29WxOrderWpf.UserControls.UcWindowBoxes"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:_29WxOrderWpf.UserControls"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
d:DesignHeight="30"
|
||||
d:DesignWidth="60"
|
||||
Background="Transparent"
|
||||
Loaded="WindowBoxes_Loaded"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Border Background="{StaticResource imgBrushCloseHover}" Width="17" Height="17" Margin="4">
|
||||
<!--<Border Background="{StaticResource imgBrushCloseHover}" Width="17" Height="17" Margin="4">
|
||||
</Border>
|
||||
<Border Grid.Column="1" Width="17" Height="17" Margin="4">
|
||||
<Image Source="{StaticResource imgCloseHover}"/>
|
||||
</Border>-->
|
||||
|
||||
<!--不使用静态资源,在用户控件嵌套时,会发生预览错误-->
|
||||
<local:UcImageButton x:Name="btnMin" Grid.Column="0" Width="17" Height="17" Background="Transparent" BorderThickness="0" Margin="4"
|
||||
ButtonImage="{StaticResource imgMin}" MouseOverButtonImage="{StaticResource imgMinHover}" MousePressButtonImage="{StaticResource imgMinHover}"/>
|
||||
<local:UcImageButton x:Name="btnMax" Grid.Column="1" Width="17" Height="17" Background="Transparent" BorderThickness="0" Visibility="Collapsed" Margin="4"
|
||||
ButtonImage="{StaticResource imgMax}" MouseOverButtonImage="{StaticResource imgMaxHover}" MousePressButtonImage="{StaticResource imgMaxHover}"/>
|
||||
<local:UcImageButton x:Name="btnNormal" Grid.Column="2" Width="17" Height="17" Background="Transparent" BorderThickness="0" Visibility="Collapsed" Margin="4"
|
||||
ButtonImage="{StaticResource imgNormal}" MouseOverButtonImage="{StaticResource imgNormalHover}" MousePressButtonImage="{StaticResource imgNormalHover}"/>
|
||||
<local:UcImageButton x:Name="btnClose" Grid.Column="3" Width="17" Height="17" Background="Transparent" BorderThickness="0" Margin="4"
|
||||
ButtonImage="{StaticResource imgClose}" MouseOverButtonImage="{StaticResource imgCloseHover}" MousePressButtonImage="{StaticResource imgCloseHover}"/>
|
||||
<!-- 不使用静态资源,在用户控件嵌套时,会发生预览错误 -->
|
||||
<local:UcImageButton
|
||||
x:Name="btnMin"
|
||||
Grid.Column="0"
|
||||
Width="17"
|
||||
Height="17"
|
||||
Margin="4"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ButtonImage="{StaticResource imgMin}"
|
||||
MouseOverButtonImage="{StaticResource imgMinHover}"
|
||||
MousePressButtonImage="{StaticResource imgMinHover}" />
|
||||
<local:UcImageButton
|
||||
x:Name="btnMax"
|
||||
Grid.Column="1"
|
||||
Width="17"
|
||||
Height="17"
|
||||
Margin="4"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ButtonImage="{StaticResource imgMax}"
|
||||
MouseOverButtonImage="{StaticResource imgMaxHover}"
|
||||
MousePressButtonImage="{StaticResource imgMaxHover}"
|
||||
Visibility="Collapsed" />
|
||||
<local:UcImageButton
|
||||
x:Name="btnNormal"
|
||||
Grid.Column="2"
|
||||
Width="17"
|
||||
Height="17"
|
||||
Margin="4"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ButtonImage="{StaticResource imgNormal}"
|
||||
MouseOverButtonImage="{StaticResource imgNormalHover}"
|
||||
MousePressButtonImage="{StaticResource imgNormalHover}"
|
||||
Visibility="Collapsed" />
|
||||
<local:UcImageButton
|
||||
x:Name="btnClose"
|
||||
Grid.Column="3"
|
||||
Width="17"
|
||||
Height="17"
|
||||
Margin="4"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
ButtonImage="{StaticResource imgClose}"
|
||||
MouseOverButtonImage="{StaticResource imgCloseHover}"
|
||||
MousePressButtonImage="{StaticResource imgCloseHover}" />
|
||||
|
||||
|
||||
<!--<local:UcImageButton x:Name="btnMin" Grid.Column="0" Width="17" Height="17" Background="Transparent" BorderThickness="0" Margin="4"
|
||||
ButtonImage="/Resources/WindowBoxes/min.png"
|
||||
<!--<local:UcImageButton x:Name="btnMin" Grid.Column="0" Width="17" Height="17" Background="Transparent" BorderThickness="0" Margin="4"
|
||||
ButtonImage="/Resources/WindowBoxes/min.png"
|
||||
MouseOverButtonImage="/Resources/WindowBoxes/min.hover.png"
|
||||
MousePressButtonImage="/Resources/WindowBoxes/min.hover.png" />
|
||||
<local:UcImageButton x:Name="btnMax" Grid.Column="1" Width="17" Height="17" Background="Transparent" BorderThickness="0" Visibility="Collapsed" Margin="4"
|
||||
ButtonImage="/Resources/WindowBoxes/max.png"
|
||||
ButtonImage="/Resources/WindowBoxes/max.png"
|
||||
MouseOverButtonImage="/Resources/WindowBoxes/max.hover.png"
|
||||
MousePressButtonImage="/Resources/WindowBoxes/max.hover.png" />
|
||||
<local:UcImageButton x:Name="btnNormal" Grid.Column="2" Width="17" Height="17" Background="Transparent" BorderThickness="0" Visibility="Collapsed" Margin="4"
|
||||
ButtonImage="/Resources/WindowBoxes/normal.png"
|
||||
ButtonImage="/Resources/WindowBoxes/normal.png"
|
||||
MouseOverButtonImage="/Resources/WindowBoxes/normal.hover.png"
|
||||
MousePressButtonImage="/Resources/WindowBoxes/normal.hover.png" />
|
||||
<local:UcImageButton x:Name="btnClose" Grid.Column="3" Width="17" Height="17" Background="Transparent" BorderThickness="0" Margin="4"
|
||||
ButtonImage="/Resources/WindowBoxes/close.png"
|
||||
ButtonImage="/Resources/WindowBoxes/close.png"
|
||||
MouseOverButtonImage="/Resources/WindowBoxes/close.hover.png"
|
||||
MousePressButtonImage="/Resources/WindowBoxes/close.hover.png" />-->
|
||||
|
||||
|
||||
<!--<Button x:Name="btnMin" Grid.Column="0" Width="17" Height="17" Background="Transparent" BorderThickness="0" Margin="4">
|
||||
|
||||
<!--<Button x:Name="btnMin" Grid.Column="0" Width="17" Height="17" Background="Transparent" BorderThickness="0" Margin="4">
|
||||
<Border>
|
||||
<Grid>
|
||||
<Image Source="/Resources/WindowBoxes/min.png" Stretch="Uniform"/>
|
||||
@@ -81,5 +125,5 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
</Button>-->
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in new issue
Block a user