コード例 #1
0
ファイル: ToolTipStyle.cs プロジェクト: MarkWalls/Perspex
 private Control Template(ToolTip control)
 {
     return new Border
     {
         [~Border.BackgroundProperty] = control[~ToolTip.BackgroundProperty],
         [~Border.BorderBrushProperty] = control[~ToolTip.BorderBrushProperty],
         [~Border.BorderThicknessProperty] = control[~ToolTip.BorderThicknessProperty],
         [~Border.PaddingProperty] = control[~ToolTip.PaddingProperty],
         Content = new ContentPresenter
         {
             Name = "contentPresenter",
             [~ContentPresenter.ContentProperty] = control[~ToolTip.ContentProperty],
         }
     };
 }
コード例 #2
0
ファイル: ToolTipStyle.cs プロジェクト: rdterner/Perspex
 /// <summary>
 /// The default template for the <see cref="ToolTip"/> control.
 /// </summary>
 /// <param name="control">The control being styled.</param>
 /// <returns>The root of the instantiated template.</returns>
 public static Control Template(ToolTip control)
 {
     return new Border
     {
         [~Border.BackgroundProperty] = control[~TemplatedControl.BackgroundProperty],
         [~Border.BorderBrushProperty] = control[~TemplatedControl.BorderBrushProperty],
         [~Border.BorderThicknessProperty] = control[~TemplatedControl.BorderThicknessProperty],
         [~Decorator.PaddingProperty] = control[~TemplatedControl.PaddingProperty],
         Child = new ContentPresenter
         {
             Name = "contentPresenter",
             [~ContentPresenter.ContentProperty] = control[~ContentControl.ContentProperty],
         }
     };
 }