mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-04 09:06:04 +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"
|
||||
xmlns:local="clr-namespace:CodeSampleVb.CodeSampleVb"
|
||||
<Window x:Class="MainWindow"
|
||||
xmlns:local="clr-namespace:CodeSampleVb"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Property value inheritance" Height="200" Width="400" Background="Yellow">
|
||||
@@ -18,7 +18,7 @@
|
||||
</Canvas>
|
||||
<!--</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">
|
||||
<Label Name="label11" Margin="20" Height="40" Width="40" Background="Blue"/>
|
||||
</StackPanel>
|
||||
|
||||
+2
-4
@@ -1,5 +1,4 @@
|
||||
Namespace CodeSampleVb
|
||||
Partial Public Class MainWindow
|
||||
Partial Public Class MainWindow
|
||||
Inherits Window
|
||||
|
||||
Public Sub New()
|
||||
@@ -28,7 +27,7 @@
|
||||
CType(AllowDropProperty.
|
||||
GetMetadata(GetType(Canvas_AllowDropInheritDisabled)), FrameworkPropertyMetadata)
|
||||
Debug.Assert(fpm11.[Inherits] = False)
|
||||
' Debug.Assert(canvas11.AllowDrop = True)
|
||||
Debug.Assert(canvas11.AllowDrop = True)
|
||||
Debug.Assert(stackPanel11.AllowDrop = False)
|
||||
Debug.Assert(label11.AllowDrop = False)
|
||||
End Sub
|
||||
@@ -250,4 +249,3 @@
|
||||
Public Class Canvas_IsTransparentInheritDisabled3
|
||||
Inherits Canvas_IsTransparentInheritDisabled
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Reference in New Issue
Block a user