optimize<PopupWidget>: simplify PopupWidget xaml

This commit is contained in:
leo 2021-05-13 11:02:50 +08:00
parent b9b0899d48
commit d1e5b5357c
28 changed files with 36 additions and 27 deletions

View file

@ -1,5 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
namespace SourceGit.Views.Controls { namespace SourceGit.Views.Controls {
@ -47,6 +48,14 @@ namespace SourceGit.Views.Controls {
currentContainer = id; currentContainer = id;
} }
/// <summary>
/// 构造函数
/// </summary>
public PopupWidget() {
Height = double.NaN;
Padding = new Thickness(1);
}
/// <summary> /// <summary>
/// 显示 /// 显示
/// </summary> /// </summary>

View file

@ -8,7 +8,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:validations="clr-namespace:SourceGit.Views.Validations" xmlns:validations="clr-namespace:SourceGit.Views.Validations"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -10,7 +10,7 @@
xmlns:models="clr-namespace:SourceGit.Models" xmlns:models="clr-namespace:SourceGit.Models"
xmlns:validations="clr-namespace:SourceGit.Views.Validations" xmlns:validations="clr-namespace:SourceGit.Views.Validations"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="800" Height="Auto" Padding="1"> d:DesignWidth="800">
<Grid> <Grid>
<Grid.Resources> <Grid.Resources>
<converters:InverseBool x:Key="InverseBool"/> <converters:InverseBool x:Key="InverseBool"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="800" Height="Auto" Padding="1"> d:DesignWidth="800">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -7,7 +7,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:validations="clr-namespace:SourceGit.Views.Validations" xmlns:validations="clr-namespace:SourceGit.Views.Validations"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -7,7 +7,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -9,7 +9,7 @@
xmlns:converters="clr-namespace:SourceGit.Views.Converters" xmlns:converters="clr-namespace:SourceGit.Views.Converters"
xmlns:validations="clr-namespace:SourceGit.Views.Validations" xmlns:validations="clr-namespace:SourceGit.Views.Validations"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.Resources> <Grid.Resources>
<converters:InverseBool x:Key="InverseBool"/> <converters:InverseBool x:Key="InverseBool"/>

View file

@ -8,7 +8,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:validations="clr-namespace:SourceGit.Views.Validations" xmlns:validations="clr-namespace:SourceGit.Views.Validations"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="800" Height="Auto" Padding="1"> d:DesignWidth="800">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:converters="clr-namespace:SourceGit.Views.Converters" xmlns:converters="clr-namespace:SourceGit.Views.Converters"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.Resources> <Grid.Resources>
<converters:InverseBool x:Key="InverseBool"/> <converters:InverseBool x:Key="InverseBool"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="800" Height="Auto" Padding="1"> d:DesignWidth="800">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -8,7 +8,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:validations="clr-namespace:SourceGit.Views.Validations" xmlns:validations="clr-namespace:SourceGit.Views.Validations"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -7,7 +7,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:models="clr-namespace:SourceGit.Models" xmlns:models="clr-namespace:SourceGit.Models"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -7,7 +7,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:converters="clr-namespace:SourceGit.Views.Converters" xmlns:converters="clr-namespace:SourceGit.Views.Converters"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<UserControl.Resources> <UserControl.Resources>
<converters:BranchToName x:Key="BranchToName"/> <converters:BranchToName x:Key="BranchToName"/>
</UserControl.Resources> </UserControl.Resources>

View file

@ -7,7 +7,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:converters="clr-namespace:SourceGit.Views.Converters" xmlns:converters="clr-namespace:SourceGit.Views.Converters"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<UserControl.Resources> <UserControl.Resources>
<converters:BranchToName x:Key="BranchToName"/> <converters:BranchToName x:Key="BranchToName"/>
</UserControl.Resources> </UserControl.Resources>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -8,7 +8,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:validations="clr-namespace:SourceGit.Views.Validations" xmlns:validations="clr-namespace:SourceGit.Views.Validations"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -8,7 +8,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:validations="clr-namespace:SourceGit.Views.Validations" xmlns:validations="clr-namespace:SourceGit.Views.Validations"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -7,7 +7,7 @@
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
xmlns:models="clr-namespace:SourceGit.Models" xmlns:models="clr-namespace:SourceGit.Models"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>

View file

@ -6,7 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:SourceGit.Views.Controls" xmlns:controls="clr-namespace:SourceGit.Views.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="500" Height="Auto" Padding="1"> d:DesignWidth="500">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="32"/> <RowDefinition Height="32"/>