本文整理汇总了C#中System.Windows.FrameworkPropertyMetadata类的典型用法代码示例。如果您正苦于以下问题:C# FrameworkPropertyMetadata类的具体用法?C# FrameworkPropertyMetadata怎么用?C# FrameworkPropertyMetadata使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FrameworkPropertyMetadata类属于System.Windows命名空间,在下文中一共展示了FrameworkPropertyMetadata类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: VerticalPanel
static VerticalPanel()
{
//tell DP sub system, this DP, will affect
//Arrange and Measure phases
var metadata = new FrameworkPropertyMetadata {AffectsArrange = true, AffectsMeasure = true};
ColumnBreakBeforeProperty = DependencyProperty.RegisterAttached("ColumnBreakBefore",typeof(bool), typeof(VerticalPanel),metadata);
}
开发者ID:JonathanDDuncan,项目名称:ISWA2010XAML,代码行数:7,代码来源:VerticalPanel.cs
示例2: MainWindow
static MainWindow()
{
FrameworkPropertyMetadata metadata = new FrameworkPropertyMetadata();
metadata.Inherits = true;
SpaceProperty = SpaceButton.SpaceProperty.AddOwner(typeof(MainWindow));
SpaceProperty.OverrideMetadata(typeof(Window), metadata);
}
开发者ID:kasicass,项目名称:kasicass,代码行数:7,代码来源:MainWindow.xaml.cs
示例3: FixedPage
//--------------------------------------------------------------------
//
// Constructors
//
//---------------------------------------------------------------------
#region Constructors
static FixedPage()
{
FrameworkPropertyMetadata metadata = new FrameworkPropertyMetadata(FlowDirection.LeftToRight, FrameworkPropertyMetadataOptions.AffectsParentArrange);
metadata.CoerceValueCallback = new CoerceValueCallback(CoerceFlowDirection);
FlowDirectionProperty.OverrideMetadata(typeof(FixedPage), metadata);
// This puts the origin always at the top left of the page and prevents mirroring unless this is overridden.
}
开发者ID:JianwenSun,项目名称:cc,代码行数:14,代码来源:FixedPage.cs
示例4: CustomDrawnElement
static CustomDrawnElement()
{
FrameworkPropertyMetadata metadata = new FrameworkPropertyMetadata(Colors.Yellow);
metadata.AffectsRender = true;
BackgroundColorProperty = DependencyProperty.Register("BackgroundColor",
typeof(Color), typeof(CustomDrawnElement), metadata);
}
开发者ID:ittray,项目名称:LocalDemo,代码行数:7,代码来源:CustomDrawnElement.cs
示例5: LixeiraProperty
static LixeiraProperty()
{
var metadata = new FrameworkPropertyMetadata((ImageSource)null);
ImageProperty = DependencyProperty.RegisterAttached("Image",
typeof(ImageSource),
typeof(LixeiraProperty), metadata);
}
开发者ID:lhlima,项目名称:CollaborationProjects,代码行数:7,代码来源:LixeiraProperty.cs
示例6: ControlBehaviors
static ControlBehaviors()
{
//register dependency property
FrameworkPropertyMetadata md = new FrameworkPropertyMetadata(null, DragsWindowPropertyChanged);
DragsWindowProperty = DependencyProperty.RegisterAttached("DragsWindow",
typeof(Window), typeof(ControlBehaviors), md);
}
开发者ID:ArildF,项目名称:linqtwit,代码行数:7,代码来源:ControlBehaviors.cs
示例7: OriginElement
public OriginElement()
{
FrameworkPropertyMetadata meta = new FrameworkPropertyMetadata();
meta.AffectsRender = true;
OriginProperty = DependencyProperty.Register("Origin", typeof(Point), typeof(OriginElement), meta);
}
开发者ID:RookieOne,项目名称:Adorners,代码行数:7,代码来源:OriginElement.cs
示例8: MaskedTextBox
/// <summary>
/// Static Constructor
/// </summary>
static MaskedTextBox()
{
//override the meta data for the Text Proeprty of the textbox
FrameworkPropertyMetadata metaData = new FrameworkPropertyMetadata();
metaData.CoerceValueCallback = ForceText;
TextProperty.OverrideMetadata(typeof(MaskedTextBox), metaData);
}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:10,代码来源:MaskedTextBox.cs
示例9: Should_Merge_Metadata_If_Supplied
public void Should_Merge_Metadata_If_Supplied()
{
FrameworkPropertyMetadata metadata1 = new FrameworkPropertyMetadata(
"foo",
FrameworkPropertyMetadataOptions.Inherits,
this.PropertyChangedCallback1,
this.CoerceCallback1);
DependencyProperty dp = DependencyProperty.Register(
"Should_Merge_Metadata_If_Supplied",
typeof(string),
typeof(TestClass1),
metadata1);
FrameworkPropertyMetadata metadata2 = new FrameworkPropertyMetadata(
"bar",
FrameworkPropertyMetadataOptions.Inherits | FrameworkPropertyMetadataOptions.AffectsRender,
this.PropertyChangedCallback2,
this.CoerceCallback2);
dp.AddOwner(typeof(TestClass2), metadata2);
FrameworkPropertyMetadata result = dp.GetMetadata(typeof(TestClass2)) as FrameworkPropertyMetadata;
Assert.IsNotNull(result);
Assert.AreNotSame(metadata1, result);
Assert.AreSame(metadata2, result);
Assert.AreEqual("bar", result.DefaultValue);
Assert.IsTrue(result.Inherits);
Assert.IsTrue(result.AffectsRender);
Assert.AreEqual(2, result.PropertyChangedCallback.GetInvocationList().Length);
Assert.AreEqual(1, result.CoerceValueCallback.GetInvocationList().Length);
}
开发者ID:modulexcite,项目名称:Avalonia,代码行数:33,代码来源:DependencyPropertyTests_AddOwner.cs
示例10: SpaceButton
static SpaceButton() {
FrameworkPropertyMetadata metadata = new FrameworkPropertyMetadata();
metadata.DefaultValue = 0;
metadata.PropertyChangedCallback += OnSpacePropertyChanged;
metadata.Inherits = true;
SpaceProperty = DependencyProperty.Register("Space", typeof(int), typeof(SpaceButton), metadata, ValidateSpaceValue);
}
开发者ID:ychost,项目名称:uest-pcs,代码行数:8,代码来源:SpaceButton.cs
示例11: TabControlExtension
static TabControlExtension()
{
//register attached dependency property
var metadata = new FrameworkPropertyMetadata(new SolidColorBrush(Colors.Red));
HeaderBackgroundProperty = DependencyProperty.RegisterAttached("HeaderBackground",
typeof (Brush),
typeof (TabControlExtension), metadata);
}
开发者ID:benneeh,项目名称:wScreenshot,代码行数:8,代码来源:TabControlExtension.cs
示例12: TitleMenu
static TitleMenu()
{
//register attached dependency property
var metadata = new FrameworkPropertyMetadata((object)null);
ContentProperty = DependencyProperty.RegisterAttached("Content",
typeof(object),
typeof(TitleMenu), metadata);
}
开发者ID:aelij,项目名称:svcperf,代码行数:8,代码来源:TitleMenu.cs
示例13: ImageSourceDep
static ImageSourceDep()
{
//register attached dependency property
var metadata = new FrameworkPropertyMetadata((ImageSource) null);
ImageProperty = DependencyProperty.RegisterAttached("Image",
typeof (ImageSource),
typeof(ImageSourceDep), metadata);
}
开发者ID:nickun,项目名称:OCRonet,代码行数:8,代码来源:ImageSourceDep.cs
示例14: WrapBreakPanel
static WrapBreakPanel()
{
FrameworkPropertyMetadata metadata = new FrameworkPropertyMetadata();
metadata.AffectsArrange = true;
metadata.AffectsMeasure = true;
LineBreakBeforeProperty = DependencyProperty.RegisterAttached("LineBreakBefore", typeof(bool), typeof(WrapBreakPanel), metadata);
}
开发者ID:ssickles,项目名称:archive,代码行数:8,代码来源:WrapBreakPanel.cs
示例15: ObtieneImagen
static ObtieneImagen()
{
var metadata = new FrameworkPropertyMetadata((ImageSource) null);
ImageProperty = DependencyProperty.RegisterAttached("Image",
typeof(ImageSource),
typeof(ObtieneImagen),
metadata);
}
开发者ID:sculmania,项目名称:SHomies,代码行数:8,代码来源:ObtieneImagen.cs
示例16: SessionView
/// <summary>
/// Initializes the <see cref="SessionView" /> class.
/// </summary>
static SessionView()
{
var propertyMetadata = new FrameworkPropertyMetadata(RESX.EmptySession)
{
CoerceValueCallback = OnCoerceTitleCallBack
};
TitleProperty.OverrideMetadata(typeof (SessionView), propertyMetadata);
}
开发者ID:StevenThuriot,项目名称:Nova,代码行数:12,代码来源:SessionView.xaml.cs
示例17: Register
public static DependencyProperty Register(string name, Type propertyType, Type ownerType, FrameworkPropertyMetadata typeMetadata)
{
DependencyProperty dp = DependencyProperty.Register(name, propertyType, ownerType, typeMetadata);
#if SILVERLIGHT
if (typeMetadata != null && typeMetadata.CoerceValueCallback != null)
FrameworkPropertyMetadata.AssociatePropertyWithCoercionMethod(dp, typeMetadata.CoerceValueCallback);
#endif
return dp;
}
开发者ID:Zoomicon,项目名称:Compatibility,代码行数:9,代码来源:DependencyPropertyExt.cs
示例18: PageWithPersistentData
static PageWithPersistentData()
{
FrameworkPropertyMetadata metadata = new FrameworkPropertyMetadata();
metadata.Journal = true;
MyPageDataProperty = DependencyProperty.Register(
"MyPageDataProperty", typeof(string), typeof(PageWithPersistentData),
metadata, null);
}
开发者ID:ittray,项目名称:LocalDemo,代码行数:9,代码来源:PageWithPersistentData.xaml.cs
示例19: ColorComboBox
static ColorComboBox()
{
ms_IsSortedByBrightnessProperty = DependencyProperty.Register("IsSortedByBrightness", typeof(bool), typeof(ColorComboBox));
FrameworkPropertyMetadata metadata = new FrameworkPropertyMetadata();
metadata.BindsTwoWayByDefault = true;
metadata.PropertyChangedCallback = new PropertyChangedCallback(OnBrushChanged);
metadata.DefaultUpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
SelectedBrushProperty = DependencyProperty.Register("SelectedBrush", typeof(Brush), typeof(ColorComboBox), metadata);
}
开发者ID:jogibear9988,项目名称:JhVirtualKeyboard,代码行数:9,代码来源:ColorComboBox.cs
示例20: DocumentContainer
public DocumentContainer()
{
InitializeComponent();
//register dockstate dependency property
var metadata = new FrameworkPropertyMetadata(DockStates.Floating);
DockState = DependencyProperty.RegisterAttached("DockState",
typeof(DockStates),
typeof(DocumentContainer), metadata);
}
开发者ID:madebysoren,项目名称:NooSphere,代码行数:10,代码来源:DocumentContainer.xaml.cs
注:本文中的System.Windows.FrameworkPropertyMetadata类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论