mirror of https://github.com/icsharpcode/ILSpy.git
5 changed files with 56 additions and 0 deletions
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using System.Threading.Tasks; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
|
||||
namespace ILSpy.BamlDecompiler.Tests.Cases |
||||
{ |
||||
public class CustomControl : ContentControl |
||||
{ |
||||
public static readonly DependencyProperty CustomNameProperty = DependencyProperty.RegisterAttached("CustomName", typeof(string), typeof(CustomControl)); |
||||
|
||||
public static string GetCustomName(DependencyObject target) |
||||
{ |
||||
return (string)target.GetValue(CustomNameProperty); |
||||
} |
||||
|
||||
public static void SetCustomName(DependencyObject target, string value) |
||||
{ |
||||
target.SetValue(CustomNameProperty, value); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:cc="clr-namespace:ILSpy.BamlDecompiler.Tests.Cases"> |
||||
<cc:CustomControl> |
||||
<cc:CustomControl.Style> |
||||
<Style /> |
||||
</cc:CustomControl.Style> |
||||
<Grid.Row>0</Grid.Row> |
||||
<cc:CustomControl.CustomName>Custom1</cc:CustomControl.CustomName> |
||||
</cc:CustomControl> |
||||
<Label> |
||||
<Label.Style> |
||||
<Style /> |
||||
</Label.Style> |
||||
<Grid.Row>0</Grid.Row> |
||||
<cc:CustomControl.CustomName>Label1</cc:CustomControl.CustomName> |
||||
</Label> |
||||
</Grid> |
Loading…
Reference in new issue