mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-08 16:06:07 +02:00
Add x:Name property to custom control in VB project (#1340)
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
<Window x:Class="CodeSampleVb.MainWindow"
|
<Window x:Class="MainWindow"
|
||||||
xmlns:local="clr-namespace:CodeSampleVb.CodeSampleVb"
|
xmlns:local="clr-namespace:CodeSampleVb"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="Property value inheritance" Height="200" Width="400" Background="Yellow">
|
Title="Property value inheritance" Height="200" Width="400" Background="Yellow">
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</Canvas>
|
</Canvas>
|
||||||
<!--</XamlElementTree>-->
|
<!--</XamlElementTree>-->
|
||||||
|
|
||||||
<local:Canvas_AllowDropInheritDisabled Grid.Column="1" Margin="20" Background="Orange" AllowDrop="True">
|
<local:Canvas_AllowDropInheritDisabled x:Name="canvas11" Grid.Column="1" Margin="20" Background="Orange" AllowDrop="True">
|
||||||
<StackPanel Name="stackPanel11" Margin="20" Background="Green">
|
<StackPanel Name="stackPanel11" Margin="20" Background="Green">
|
||||||
<Label Name="label11" Margin="20" Height="40" Width="40" Background="Blue"/>
|
<Label Name="label11" Margin="20" Height="40" Width="40" Background="Blue"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
+4
-6
@@ -1,5 +1,4 @@
|
|||||||
Namespace CodeSampleVb
|
Partial Public Class MainWindow
|
||||||
Partial Public Class MainWindow
|
|
||||||
Inherits Window
|
Inherits Window
|
||||||
|
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
@@ -28,7 +27,7 @@
|
|||||||
CType(AllowDropProperty.
|
CType(AllowDropProperty.
|
||||||
GetMetadata(GetType(Canvas_AllowDropInheritDisabled)), FrameworkPropertyMetadata)
|
GetMetadata(GetType(Canvas_AllowDropInheritDisabled)), FrameworkPropertyMetadata)
|
||||||
Debug.Assert(fpm11.[Inherits] = False)
|
Debug.Assert(fpm11.[Inherits] = False)
|
||||||
' Debug.Assert(canvas11.AllowDrop = True)
|
Debug.Assert(canvas11.AllowDrop = True)
|
||||||
Debug.Assert(stackPanel11.AllowDrop = False)
|
Debug.Assert(stackPanel11.AllowDrop = False)
|
||||||
Debug.Assert(label11.AllowDrop = False)
|
Debug.Assert(label11.AllowDrop = False)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -149,9 +148,9 @@
|
|||||||
Debug.Assert(Canvas_IsTransparentInheritDisabled.GetIsTransparent(myCanvas6) = False)
|
Debug.Assert(Canvas_IsTransparentInheritDisabled.GetIsTransparent(myCanvas6) = False)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class Canvas_AllowDropInheritDisabled
|
Public Class Canvas_AllowDropInheritDisabled
|
||||||
Inherits Canvas
|
Inherits Canvas
|
||||||
Shared Sub New()
|
Shared Sub New()
|
||||||
' Disable property value inheritance in a new property metadata object.
|
' Disable property value inheritance in a new property metadata object.
|
||||||
@@ -250,4 +249,3 @@
|
|||||||
Public Class Canvas_IsTransparentInheritDisabled3
|
Public Class Canvas_IsTransparentInheritDisabled3
|
||||||
Inherits Canvas_IsTransparentInheritDisabled
|
Inherits Canvas_IsTransparentInheritDisabled
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
|
||||||
|
|||||||
Reference in New Issue
Block a user