init branch
This commit is contained in:
1 parent
224cc4458b
commit
9f28dbbb67
17 files changed
+248
-11
No files matched your search
@@ -8,6 +8,7 @@
|
|||||||
<Version>1.5.5</Version>
|
<Version>1.5.5</Version>
|
||||||
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
|
<ApplicationIcon>..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico</ApplicationIcon>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
|
<Copyright>Copyright © HandyOrg 2018-2019</Copyright>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
<DefineConstants>TRACE;Core</DefineConstants>
|
<DefineConstants>TRACE;Core</DefineConstants>
|
||||||
@@ -316,7 +317,7 @@
|
|||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WindowsForm_16x.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WindowsForm_16x.png">
|
||||||
<Link>Resources\Img\LeftMainContent\WindowsForm_16x.png</Link>
|
<Link>Resources\Img\LeftMainContent\WindowsForm_16x.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\WindowsForm_16x.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\GridPane_16x.png">
|
||||||
<Link>Resources\Img\LeftMainContent\GridPane_16x.png</Link>
|
<Link>Resources\Img\LeftMainContent\GridPane_16x.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\qq-group.jpg">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\qq-group.jpg">
|
||||||
@@ -346,12 +347,12 @@
|
|||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\fabric-icons.ttf">
|
||||||
<Link>Resources\fabric-icons.ttf</Link>
|
<Link>Resources\fabric-icons.ttf</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\MainMenuControl_16x.png">
|
|
||||||
<Link>Resources\Img\LeftMainContent\MainMenuControl_16x.png</Link>
|
|
||||||
</Resource>
|
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\brackets_Square_16xLG.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\brackets_Square_16xLG.png">
|
||||||
<Link>Resources\Img\LeftMainContent\brackets_Square_16xLG.png</Link>
|
<Link>Resources\Img\LeftMainContent\brackets_Square_16xLG.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\PaneLayout_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\PaneLayout_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx">
|
<EmbeddedResource Include="..\..\Shared\HandyControlDemo_Shared\Properties\Langs\Lang.en.resx">
|
||||||
|
|||||||
@@ -395,6 +395,9 @@
|
|||||||
<Generator>TextTemplatingFileGenerator</Generator>
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\PaneLayout_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\PaneLayout_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\brackets_Square_16xLG.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\brackets_Square_16xLG.png">
|
||||||
<Link>Resources\Img\LeftMainContent\brackets_Square_16xLG.png</Link>
|
<Link>Resources\Img\LeftMainContent\brackets_Square_16xLG.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|||||||
@@ -414,6 +414,9 @@
|
|||||||
<Generator>TextTemplatingFileGenerator</Generator>
|
<Generator>TextTemplatingFileGenerator</Generator>
|
||||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\PaneLayout_16x.png">
|
||||||
|
<Link>Resources\Img\LeftMainContent\PaneLayout_16x.png</Link>
|
||||||
|
</Resource>
|
||||||
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\brackets_Square_16xLG.png">
|
<Resource Include="..\..\Shared\HandyControlDemo_Shared\Resources\Img\LeftMainContent\brackets_Square_16xLG.png">
|
||||||
<Link>Resources\Img\LeftMainContent\brackets_Square_16xLG.png</Link>
|
<Link>Resources\Img\LeftMainContent\brackets_Square_16xLG.png</Link>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|||||||
@@ -98,6 +98,8 @@
|
|||||||
|
|
||||||
public static readonly string RangeSliderDemoCtl = nameof(RangeSliderDemoCtl);
|
public static readonly string RangeSliderDemoCtl = nameof(RangeSliderDemoCtl);
|
||||||
|
|
||||||
|
public static readonly string RelativePanelDemoCtl = nameof(RelativePanelDemoCtl);
|
||||||
|
|
||||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||||
|
|
||||||
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
|
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ var controlList = new List<string>
|
|||||||
"DialogDemoCtl",
|
"DialogDemoCtl",
|
||||||
"SideMenuDemoCtl",
|
"SideMenuDemoCtl",
|
||||||
"GridDemoCtl",
|
"GridDemoCtl",
|
||||||
"RangeSliderDemoCtl"
|
"RangeSliderDemoCtl",
|
||||||
|
"RelativePanelDemoCtl"
|
||||||
};
|
};
|
||||||
var styleList = new List<string>
|
var styleList = new List<string>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,6 +50,9 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml.cs">
|
||||||
<DependentUpon>RangeSliderDemoCtl.xaml</DependentUpon>
|
<DependentUpon>RangeSliderDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RelativePanelDemoCtl.xaml.cs">
|
||||||
|
<DependentUpon>RelativePanelDemoCtl.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\BadgeDemoCtl.xaml.cs">
|
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\BadgeDemoCtl.xaml.cs">
|
||||||
<DependentUpon>BadgeDemoCtl.xaml</DependentUpon>
|
<DependentUpon>BadgeDemoCtl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -398,6 +401,10 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\RelativePanelDemoCtl.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml">
|
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -753,9 +760,4 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Compile Update="E:\Work\GitHub\HandyControl\src\Shared\HandyControlDemo_Shared\UserControl\Controls\Avatar.xaml.cs">
|
|
||||||
<DependentUpon>RangeSliderDemoCtl.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1113,6 +1113,15 @@ namespace HandyControlDemo.Properties.Langs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 相对布局 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string RelativePanel {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("RelativePanel", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 备注 的本地化字符串。
|
/// 查找类似 备注 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -609,4 +609,7 @@
|
|||||||
<data name="RangeSlider" xml:space="preserve">
|
<data name="RangeSlider" xml:space="preserve">
|
||||||
<value>RangeSlider</value>
|
<value>RangeSlider</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="RelativePanel" xml:space="preserve">
|
||||||
|
<value>RelativePanel</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -609,4 +609,7 @@
|
|||||||
<data name="RangeSlider" xml:space="preserve">
|
<data name="RangeSlider" xml:space="preserve">
|
||||||
<value>范围滑块</value>
|
<value>范围滑块</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="RelativePanel" xml:space="preserve">
|
||||||
|
<value>相对布局</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 164 B |
@@ -0,0 +1,6 @@
|
|||||||
|
<UserControl x:Class="HandyControlDemo.UserControl.RelativePanelDemoCtl"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl">
|
||||||
|
<userControl:UnderConstruction/>
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace HandyControlDemo.UserControl
|
||||||
|
{
|
||||||
|
public partial class RelativePanelDemoCtl
|
||||||
|
{
|
||||||
|
public RelativePanelDemoCtl()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -325,6 +325,11 @@
|
|||||||
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/Panel_16x.png"/>
|
||||||
</hc:EdgeElement.LeftContent>
|
</hc:EdgeElement.LeftContent>
|
||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
|
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.RelativePanelDemoCtl}" Content="{x:Static langs:Lang.RelativePanel}">
|
||||||
|
<hc:EdgeElement.LeftContent>
|
||||||
|
<Image Source="../../Resources/Img/LeftMainContent/PaneLayout_16x.png"/>
|
||||||
|
</hc:EdgeElement.LeftContent>
|
||||||
|
</ListBoxItem>
|
||||||
<ListBoxItem Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
|
<ListBoxItem Tag="{x:Static data:MessageToken.CoverViewDemoCtl}" Content="{x:Static langs:Lang.CoverView}">
|
||||||
<hc:EdgeElement.LeftContent>
|
<hc:EdgeElement.LeftContent>
|
||||||
<Image Source="../../Resources/Img/LeftMainContent/DetailDataView_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/DetailDataView_16x.png"/>
|
||||||
@@ -415,7 +420,7 @@
|
|||||||
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/ScrollBox_16x.png"/>
|
||||||
</hc:EdgeElement.LeftContent>
|
</hc:EdgeElement.LeftContent>
|
||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.DialogDemoCtl}" Content="{x:Static langs:Lang.Dialog}">
|
<ListBoxItem Tag="{x:Static data:MessageToken.DialogDemoCtl}" Content="{x:Static langs:Lang.Dialog}">
|
||||||
<hc:EdgeElement.LeftContent>
|
<hc:EdgeElement.LeftContent>
|
||||||
<Image Source="../../Resources/Img/LeftMainContent/Dialog_16x.png"/>
|
<Image Source="../../Resources/Img/LeftMainContent/Dialog_16x.png"/>
|
||||||
</hc:EdgeElement.LeftContent>
|
</hc:EdgeElement.LeftContent>
|
||||||
|
|||||||
@@ -0,0 +1,132 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using HandyControl.Tools.Converter;
|
||||||
|
|
||||||
|
namespace HandyControl.Controls
|
||||||
|
{
|
||||||
|
public class RelativePanel : Panel
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty AboveProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"Above", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetAbove(DependencyObject element, DependencyObject value) => element.SetValue(AboveProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetAbove(DependencyObject element) => (DependencyObject)element.GetValue(AboveProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignBottomWithProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignBottomWith", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetAlignBottomWith(DependencyObject element, DependencyObject value) => element.SetValue(AlignBottomWithProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetAlignBottomWith(DependencyObject element) => (DependencyObject)element.GetValue(AlignBottomWithProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignBottomWithPanelProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignBottomWithPanel", typeof(bool), typeof(RelativePanel), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
|
public static void SetAlignBottomWithPanel(DependencyObject element, bool value) => element.SetValue(AlignBottomWithPanelProperty, value);
|
||||||
|
|
||||||
|
public static bool GetAlignBottomWithPanel(DependencyObject element) => (bool)element.GetValue(AlignBottomWithPanelProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignHorizontalCenterWithProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignHorizontalCenterWith", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetAlignHorizontalCenterWith(DependencyObject element, DependencyObject value) => element.SetValue(AlignHorizontalCenterWithProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetAlignHorizontalCenterWith(DependencyObject element) => (DependencyObject)element.GetValue(AlignHorizontalCenterWithProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignHorizontalCenterWithPanelProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignHorizontalCenterWithPanel", typeof(bool), typeof(RelativePanel), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
|
public static void SetAlignHorizontalCenterWithPanel(DependencyObject element, bool value) => element.SetValue(AlignHorizontalCenterWithPanelProperty, value);
|
||||||
|
|
||||||
|
public static bool GetAlignHorizontalCenterWithPanel(DependencyObject element) => (bool)element.GetValue(AlignHorizontalCenterWithPanelProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignLeftWithProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignLeftWith", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetAlignLeftWith(DependencyObject element, DependencyObject value) => element.SetValue(AlignLeftWithProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetAlignLeftWith(DependencyObject element) => (DependencyObject)element.GetValue(AlignLeftWithProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignLeftWithPanelProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignLeftWithPanel", typeof(bool), typeof(RelativePanel), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
|
public static void SetAlignLeftWithPanel(DependencyObject element, bool value) => element.SetValue(AlignLeftWithPanelProperty, value);
|
||||||
|
|
||||||
|
public static bool GetAlignLeftWithPanel(DependencyObject element) => (bool)element.GetValue(AlignLeftWithPanelProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignRightWithProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignRightWith", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetAlignRightWith(DependencyObject element, DependencyObject value) => element.SetValue(AlignRightWithProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetAlignRightWith(DependencyObject element) => (DependencyObject)element.GetValue(AlignRightWithProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignRightWithPanelProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignRightWithPanel", typeof(bool), typeof(RelativePanel), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
|
public static void SetAlignRightWithPanel(DependencyObject element, bool value) => element.SetValue(AlignRightWithPanelProperty, value);
|
||||||
|
|
||||||
|
public static bool GetAlignRightWithPanel(DependencyObject element) => (bool)element.GetValue(AlignRightWithPanelProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignTopWithProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignTopWith", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetAlignTopWith(DependencyObject element, DependencyObject value) => element.SetValue(AlignTopWithProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetAlignTopWith(DependencyObject element) => (DependencyObject)element.GetValue(AlignTopWithProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignTopWithPanelProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignTopWithPanel", typeof(bool), typeof(RelativePanel), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
|
public static void SetAlignTopWithPanel(DependencyObject element, bool value) => element.SetValue(AlignTopWithPanelProperty, value);
|
||||||
|
|
||||||
|
public static bool GetAlignTopWithPanel(DependencyObject element) => (bool)element.GetValue(AlignTopWithPanelProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignVerticalCenterWithProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignVerticalCenterWith", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetAlignVerticalCenterWith(DependencyObject element, DependencyObject value) => element.SetValue(AlignVerticalCenterWithProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetAlignVerticalCenterWith(DependencyObject element) => (DependencyObject)element.GetValue(AlignVerticalCenterWithProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty AlignVerticalCenterWithPanelProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"AlignVerticalCenterWithPanel", typeof(bool), typeof(RelativePanel), new PropertyMetadata(default(bool)));
|
||||||
|
|
||||||
|
public static void SetAlignVerticalCenterWithPanel(DependencyObject element, bool value) => element.SetValue(AlignVerticalCenterWithPanelProperty, value);
|
||||||
|
|
||||||
|
public static bool GetAlignVerticalCenterWithPanel(DependencyObject element) => (bool)element.GetValue(AlignVerticalCenterWithPanelProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty BelowProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"Below", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetBelow(DependencyObject element, DependencyObject value) => element.SetValue(BelowProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetBelow(DependencyObject element) => (DependencyObject)element.GetValue(BelowProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty LeftOfProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"LeftOf", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetLeftOf(DependencyObject element, DependencyObject value) => element.SetValue(LeftOfProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetLeftOf(DependencyObject element) => (DependencyObject)element.GetValue(LeftOfProperty);
|
||||||
|
|
||||||
|
public static readonly DependencyProperty RightOfProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"RightOf", typeof(DependencyObject), typeof(RelativePanel), new PropertyMetadata(default(DependencyObject)));
|
||||||
|
|
||||||
|
public static void SetRightOf(DependencyObject element, DependencyObject value) => element.SetValue(RightOfProperty, value);
|
||||||
|
|
||||||
|
[TypeConverter(typeof(NameReferenceConverter))]
|
||||||
|
public static DependencyObject GetRightOf(DependencyObject element) => (DependencyObject)element.GetValue(RightOfProperty);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
namespace HandyControl_Shared.Data.Enum
|
||||||
|
{
|
||||||
|
public enum RelativeStatus
|
||||||
|
{
|
||||||
|
LeftOf,
|
||||||
|
|
||||||
|
Above,
|
||||||
|
|
||||||
|
RightOf,
|
||||||
|
|
||||||
|
Below,
|
||||||
|
|
||||||
|
AlignLeftWith,
|
||||||
|
|
||||||
|
AlignTopWith,
|
||||||
|
|
||||||
|
AlignRightWith,
|
||||||
|
|
||||||
|
AlignBottomWith,
|
||||||
|
|
||||||
|
AlignHorizontalCenterWith,
|
||||||
|
|
||||||
|
AlignVerticalCenterWith,
|
||||||
|
|
||||||
|
AlignLeftWithPanel,
|
||||||
|
|
||||||
|
AlignTopWithPanel,
|
||||||
|
|
||||||
|
AlignRightWithPanel,
|
||||||
|
|
||||||
|
AlignBottomWithPanel,
|
||||||
|
|
||||||
|
AlignHorizontalCenterWithPanel,
|
||||||
|
|
||||||
|
AlignVerticalCenterWithPanel
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,10 +18,13 @@
|
|||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\InfoElement.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\InfoElement.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PanelElement.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PanelElement.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PasswordBoxMonitor.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\PasswordBoxMonitor.cs" />
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\RelativePanel.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeTrack.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeTrack.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\RelativeStatus.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
|
||||||
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\NameReferenceConverter.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\StringExtension.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\Extension\StringExtension.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\GlobalShortcut.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Tools\GlobalShortcut.cs" />
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\StatusSwitchElement.cs" />
|
<Compile Include="$(MSBuildThisFileDirectory)Controls\Attach\StatusSwitchElement.cs" />
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Globalization;
|
||||||
|
// ReSharper disable ConditionIsAlwaysTrueOrFalse
|
||||||
|
// ReSharper disable HeuristicUnreachableCode
|
||||||
|
|
||||||
|
namespace HandyControl.Tools.Converter
|
||||||
|
{
|
||||||
|
public class NameReferenceConverter : System.Windows.Markup.NameReferenceConverter
|
||||||
|
{
|
||||||
|
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
|
||||||
|
=> context == null ? null : base.ConvertFrom(context, culture, value);
|
||||||
|
|
||||||
|
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
|
||||||
|
=> context == null ? null : base.ConvertTo(context, culture, value, destinationType);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user